I have not been using ReactJS for very long. I have a situation that I think must be very common, but I’ve not seen it addressed in any examples, and I’d like to know if there are any best practices involved.
The scenario is simply that say I have 3 forms in my application, FormA, FormB, and FormC. I have written each form as a separate ReactJS component. When the user lands on the site, FormA is displayed. Depending on the input on FormA, then either FormB or FormC will be displayed next, completely replacing FormA on the page.
I don’t think “routing” is the answer because I don’t want the URL to reflect the current application state, and I don’t want the user to be able to change forms by changing the URL. The switching of forms (components) should be done based only on business rules.
I know ReactJS is not a framework, but this seems like a common enough scenario that some useful patterns have probably evolved around it. Just a nudge in the right direction would be very helpful. Thank you.