Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.

Convert hooks into shared states between React components
Rex State allows you to convert the result of your hooks into a shared state between multiple React components using the Context API.
Consider the following hook which lets you toggle theme between light & dark modes
You can use the createRexStore module from rex state to create a provider & a store hook to access the result of your useThemeMode
The useStore hook & RexProvider are renamed to useTheme & ThemeProvider for use in the application.
Now you can wrap your entire Application inside the ThemeProvider to ensure the context is setup properly for the useTheme hook.
Note: The value of the argument of
useThemeModefunction -initialThemeis supplied to theThemeProviderusing thevalueprop. Thevalueprop only supports a single argument. Hence if your hook requires multiple arguments, you can pass them as a single object
Once you add the ThemeProvider to the top of your application's tree, the child components can now use the useTheme hook to access the result of your useThemeMode hook. This time, when you call toggleTheme in any of the child components, it will cause your entire application tree to re-render & all the components that use the useTheme hook will have the updated value!
The following is a toggle button that toggles the theme when users click on it.
The next component is a text block that simply displays the theme's mode
As you can see, calling the toggleTheme function from the <ToggleButton/> component updates the <ThemeText/> component. This means your hook is now a shared state between the two components!
Also, check out the counter example from codesandbox
Rex State is good for some use cases and not suitable for some use cases since it uses the React Context API which is considered inefficient as a change causes the entire React child tree to re-render. Read the performance section to see how to use Rex State effectively.