1

At our studio, we're struggling with understanding good usages of stores in react/fluxible. Essentially, how do we store temporary information (like success and errors) required to proceed through UI flows without keeping that information around forever? We have always understood stores as keeping persistent information. In a multi-page registration flow, step1Complete doesn't seem like a good candidate to track in a store.

Another option we've seen is to use AJAX calls in the component to make these simple calls that just grant you the data you need in the moment in order to proceed. Is that a common practice? Does that break an isomorphic app?

Are we overthinking?

  • 2
    Honestly, it sounds like you might want to get the router involved for this situation. When the user completes step1, update the store and trigger an action to navigate from step1 to step2. If the user wants to go back to step1, just go back and fill the form with all of the data in the store. You can use the "step1Complete" data to display a button which will take them to step2. – Cory Danielson Jun 11 '15 at 21:57

1 Answers1

0

success for a step can also be classified as a state of the step, is it not? I would keep it as a prop for the step. Or as @Cory pointed out, router2->Action-> store update->emit change->step 2

with great power comes great responsibility.Dont use ajax calls for boolean state values

Rajat banerjee
  • 1,781
  • 3
  • 17
  • 35