@acrool/react-providers
v0.0.3
Published
This is a compose providers avoid nesting for React Function
Downloads
63
Maintainers
Readme
Acrool React Providers
Features
- Compose providers avoid nesting
- Support type check
Install
yarn add @acrool/react-providers
Usage
then in your page
import composedProviders, {providerWithProps} from "@acrool/react-providers";
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
createElement(composedProviders(
[
providerWithProps(ReduxProvider, {store}),
providerWithProps(ApolloProvider, {client: apolloClient}),
providerWithProps(ReactQueryClientProvider, {}),
providerWithProps(ReactLocaleProvider, {}),
providerWithProps(Router, {history: history, basename: routePrefixPath}),
providerWithProps(AxiosClientProvider, {}),
providerWithProps(StyleSheetManager, {stylisPlugins: [rtlPlugin]}),
providerWithProps(GridThemeProvider, {gridTheme: gridConfig}),
providerWithProps(ThemeProvider, {theme: appTheme}),
providerWithProps(UIProvider, {}),
]
)(App))
);