Skip to content

This is a compose providers avoid nesting for React Function

License

Notifications You must be signed in to change notification settings

acrool/acrool-react-providers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

dd80e6f · Sep 6, 2024

History

14 Commits
Jul 31, 2024
Aug 7, 2024
Sep 6, 2024
Jul 31, 2024
Jul 31, 2024
Jul 31, 2024
Jul 31, 2024
Sep 6, 2024
Jul 31, 2024
Jul 31, 2024
Aug 8, 2024
Sep 6, 2024
Jul 31, 2024
Jul 31, 2024
Sep 6, 2024
Jul 31, 2024
Jul 31, 2024
Jul 31, 2024
Jul 31, 2024
Jul 31, 2024

Repository files navigation

Acrool React Providers

Acrool React Providers Logo

This is a compose providers avoid nesting for React Function

NPM npm npm

npm downloads npm

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))
);

License

MIT © Acrool & Imagine

About

This is a compose providers avoid nesting for React Function

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published