We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Canner Compiler compiles the data schema to a component tree that contains the Layout UI.
There are two parts of Canner Compiler: Parser and Traverser.
Parser
Traverser
Parser initializes the component tree from the data schema.
interface
type Node = { nodeType: string, name?: string, [string]: any } type ParentNode = Node & { children: Array<Node> } type Tree = { [key: string]: ParentNode }
Traverser transforms the tree generated from Parser with the given visistors.
visistors
The operation is same as the Traveral of bable plugin
type Route = ''; type Path = { node: Node, parent: ParentNode, tree: Tree, route: Route }; type Visitor = { [nodeType: $PropertyType<Node, 'node'>]: { enter?: (path: Path) => void; exit?: (path: Path) => void; } }