Hi!
I’m still a very low-level Fuse developer, so excuse my stupidity if there’s an obvious offering.
Just wondering if anyone has implemented a state management system–or if there’s a similar concept–with Fuse. I’m trying to pass several parameters through different functions back to a home screen.
For example,
<App>
<DockPanel>
<StatusBarBackground Dock="Top" />
<BottomBarBackground Dock="Bottom" />
<ScrollView>
<Grid ColumnCount="1">
<JavaScript File="../receive.js"/>
<Button Text="{first.id}" Clicked="{firstPush}" />
<Button Text="{second.id}" Clicked="{seconPush}" />
<Button Text="{third.id}" Clicked="{thirdPush}" />
</Grid>
</ScrollView>
</DockPanel>
Each page then renders a list from JSON, for simplicity let’s say it is {'first':[{'id':1,'desc':'one'},{'id':2,'desc':'two'},{'id':3,'desc':'three'}],'second':[{'id':1,'desc':'one'},{'id':2,'desc':'two'},{'id':3,'desc':'three'}]
Each page would render a list, and have a function to push the selected item back to the home.ux
with a function such as:
<Each Items="{data.first}">
<Button Text="{id}" Clicked="{selectFirst}" />
</Each>
With selectFirst
:
function selectFirst(arg) {
var first = arg.data;
router.push("home", first);
}
How would I then receive each Parameter individually? A state management style would simplify things a lot for me, because there are more than 3 different passing of parameters. Unless there is a more clear solution?
Thanks!