Redux-Bundler Hook provides React bindings for the Redux-Bundler library, leveraging modern React Hooks for state management within React applications. Its current stable version is 1.0.3, with recent updates focusing on performance improvements, bug fixes, and the introduction of the `useReduxBundlerStore` hook. This package aims to simplify integrating a `redux-bundler` store into React components by offering `useConnect` for selecting specific bundle selectors and actions, and `ReduxBundlerProvider` for making the store available throughout the component tree. It maintains a relatively stable release cadence with minor updates and fixes, primarily driven by community needs and `redux-bundler` ecosystem changes. Key differentiators include its tight integration with `redux-bundler`'s design patterns and its use of standard React Hooks.
npm install redux-bundler-hookVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up `ReduxBundlerProvider` at the application root and use the `useConnect` hook in a functional component to access selectors and actions from the Redux-Bundler store.
Ensure that `createStore()` from your bundles is called and its result is passed to the `store` prop of `ReduxBundlerProvider`.
Upgrade to version 1.0.1 or higher to ensure `useConnect` properly re-evaluates its connections when arguments change.
Ensure all hook calls (`useConnect`, `useReduxBundlerStore`) are made within React functional components and that the application is wrapped by `ReduxBundlerProvider`.
Install `redux-bundler` and `react` at versions compatible with your project, typically by running `npm install redux-bundler react` alongside this package.
Ensure `useConnect` or `useReduxBundlerStore` are only called at the top level of a functional component or another custom hook.
Verify that `<ReduxBundlerProvider store={yourStore}>` wraps your component tree and that `yourStore` is a valid `redux-bundler` store instance. Check for duplicate React installations in your `node_modules`.Double-check the string arguments passed to `useConnect` against the names of your `redux-bundler` selectors and actions. Ensure the store is correctly initialized and passed to `ReduxBundlerProvider`.