boolean variable
inside the
component.boolean $<boolean-variable>: true
if condition
to the Body part.if: { box.<boolean-variable> }
on-click
.$on-click$: $toggle($<function-argument> = $box.<boolean-variable>)
toggle function
after component.-- void toggle(<function-argument>):
boolean $function-argument:
<function-argument> = !<function-argument>;
Don't want to rewrite this but want to reuse it in your next project?
Or, You want to share it with others?
In Part 5, you will learn how to publish it as a package on GitHub.