Last active
July 5, 2023 09:54
-
-
Save geraldodev/1bd53e88a1217c8e560843b53e93a53b to your computer and use it in GitHub Desktop.
How would you map a default function component to clojurescript when generating equivalent code ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:type "File", | |
:errors [], | |
:program | |
{:type "Program", | |
:sourceType "module", | |
:interpreter nil, | |
:body | |
[{:type "ExportDefaultDeclaration", | |
:exportKind "value", | |
:declaration | |
{:async false, | |
:params [], | |
:type "FunctionDeclaration", | |
:id {:type "Identifier", :name "AccordionDemo"}, | |
:generator false, | |
:isReactComponent true, | |
:body | |
{:type "BlockStatement", | |
:body | |
[{:type "ReturnStatement", | |
:argument | |
{:type "JSXElement", | |
:openingElement | |
{:type "JSXOpeningElement", | |
:name {:type "JSXIdentifier", :name "div"}, | |
:attributes [], | |
:selfClosing false}, | |
:closingElement | |
{:type "JSXClosingElement", | |
:name {:type "JSXIdentifier", :name "div"}}, | |
:children | |
[{:type "JSXText", | |
:extra {:rawValue "test", :raw "test"}, | |
:value "test"}]}}], | |
:directives []}}}], | |
:directives []}, | |
:comments []} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment