mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
17 lines
252 B
Plaintext
17 lines
252 B
Plaintext
import Child from "./child"
|
|
|
|
class {
|
|
onCreate() {
|
|
this.state = { display: true };
|
|
}
|
|
|
|
toggle() {
|
|
this.state.display = !this.state.display;
|
|
}
|
|
}
|
|
|
|
<div key="root">
|
|
<if(state.display)>
|
|
<${Child}/>
|
|
</if>
|
|
</div> |