File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,44 +127,5 @@ function MainComponent({ properties, useState }) {
127127
128128mount (
129129 document . getElementById ( "root-container" ) ,
130- new ComponentNode ( {
131- componentFunction : ( { properties, useState} ) => {
132- let [ counter , setCounter ] = useState ( 0 ) ;
133-
134- return new HtmlNode ( {
135- elementType : "div" ,
136- properties : {
137- key : properties . key ,
138- } ,
139- children : [
140- new HtmlNode ( {
141- elementType : "p" ,
142- properties : {
143- key : "1" ,
144- } ,
145- children : [
146- new TextNode ( {
147- text : `Counter: ${ counter } ` ,
148- } ) ,
149- ] ,
150- } ) ,
151- new HtmlNode ( {
152- elementType : "button" ,
153- properties : {
154- key : "2" ,
155- $click : ( ) => setCounter ( counter + 1 ) ,
156- } ,
157- children : [
158- new TextNode ( {
159- text : "Increment" ,
160- } ) ,
161- ] ,
162- } ) ,
163- ] ,
164- } ) ;
165- } ,
166- properties : {
167- key : "root" ,
168- } ,
169- } ) ,
130+ < MainComponent key = "root" /> ,
170131) ;
You can’t perform that action at this time.
0 commit comments