In my react.js (Fluxxor) application I have to navigate between different forms. For example: Login component is shown as long as the user is not authenticated. Once the user logs in the login component disappears an a list of entries component (or something else) should be displayed. From there I could open the entry detail component (which means that the list of entries component should be hidden).
What is the best approach for this?
What I've tried:
THanks
I am partial to the third approach, which is having one component manage the "state" of the application by rendering different components. Controller views are then in charge of registering child components and interacting with stores/services as necessary. I typically use react router and have top level routes for each of my controller views.
The following pseudocode expresses the structure:
<Router>
<ControllerView>
<SubComponent>
<AnotherSubComponent>
</ControllerView>
<AnotherControllerView>
<SubComponent>
<AnotherSubComponent>
</AnotherControllerView>
</Router>