State management (Redux/Vuex/similar) in Fuse

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!

Hi Nick,

happy to see you have some pre-Fuse background, but let’s break it apart :slight_smile:

I would like you to start with two forum posts: this and this.

Those should put you in the MVVM mood and, as stated in the first link, you would usually handle your “state” in models.

The other part of your question where you ask about receiving Parameters is covered in Navigation docs.

As for a complete state management system, there is currently no active effort on making a common/standardised one. However, if you’ll find me (I’m @uldis) on our Slack community I’ll share some hints, tips and tricks.