Closed thesabinelim closed 1 year ago
Allows loading of child layouts within another layout, which react to updates in their reactive props. Treat this as a proof of concept and just cementing the API, because the implementation will certainly change. Example:
layout.xml
<script> local basalt = require("basalt") AnotherLayout = basalt.layout("another_layout.xml") getText, setText = basalt.reactive("Button not clicked") </script> <AnotherLayout text={getText()} /> <button text="Click me"> <onClick> setText("Button clicked") </onClick> </button>
another_layout.xml
<label text={props.text} />
Allows loading of child layouts within another layout, which react to updates in their reactive props. Treat this as a proof of concept and just cementing the API, because the implementation will certainly change. Example:
layout.xml
another_layout.xml