1.0.8 • Published 5 months ago

react-combined-providers v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

react-combined-providers

A utility for combining multiple React Context Providers into a single component. This helps to keep your provider hierarchy clean and manageable.

Installation

You can install the package using npm or yarn:

npm install react-combined-providers
# or
yarn add react-combined-providers

Usage

Wrap your application with CombinedProviders, passing an array of your context providers:

import { CombinedProviders } from "react-combined-providers";
import { ThemeProvider } from "./contexts/ThemeContext";
import { AuthProvider } from "./contexts/AuthContext";
import { StoreProvider } from "./contexts/StoreContext";

const App = () => (
  <CombinedProviders providers={[ThemeProvider, AuthProvider, StoreProvider]}>
    <YourApp />
  </CombinedProviders>
);

export default App;

Why use react-combined-provider?

šŸ›  Simplifies context management – No more deeply nested providers.

šŸš€ Easy to extend – Just add more providers to the array.

āœ… Lightweight & flexible – Works with any React context providers.

License

This project is licensed under the MIT License.

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago