I have built a multistep wizard to allow people to configure a smart device. When the user has completed the wizard, they may need to configure another device so I send them back to the first step in the wizard. The problem is that whatever page I am on will reflect its most recent screen state, and I want to be able to reset the entire app back to its default state, which obviously includes having all of its pages reset back to their initial states. How can I reset the app itself back to its original default state? I am using React 18.2.0.
The shape of the app is like this. Each step is a route to a component which can contain multiple screens:
<IonApp>
<IonReactRouter>
<IonSplitPane contentId="main" when="xs">
<Menu />
<IonRouterOutlet id="main">
<Route path="/bluetooth" exact={true}>
<Bluetooth />
</Route>
<Route path="/wifi" exact={true}>
<WiFi />
</Route>
<Route path="/initialize" exact={true}>
<Initialize />
</Route>
</IonRouterOutlet>
</IonSplitPane>
</IonReactRouter>
</IonApp>