Module: JsxRosetta::Routes

Defined in:
lib/jsx_rosetta/routes.rb

Overview

React Router → IR::RouteTree extraction. Recognizes the JSX-based declarative form (<Routes><Route path=“…” element=/> /></Routes>) and the bare ‘<Route path=“…” element=/> />` form anywhere in the AST. The data-router form (createBrowserRouter([{ path, element }])) is a future addition.

Defined Under Namespace

Classes: Lowering

Class Method Summary collapse

Class Method Details

.lower(ast_file) ⇒ Object



12
13
14
# File 'lib/jsx_rosetta/routes.rb', line 12

def self.lower(ast_file)
  Lowering.new.lower(ast_file)
end