React Redux
react-redux
Official React bindings for Redux
State Management
react
reactjs
redux
react-redux
State Management
javascript
npm
frontend
open source
ui
Stars
23k
Weekly
33M
Open issues
42
Bundle
~15 kB
Installation
npm install react-reduxCode example
import { create } from "react-redux";
const useStore = create((set) => ({
count: 0,
inc: () => set((s) => ({ count: s.count + 1 })),
}));
export function Example() {
const { count, inc } = useStore();
return (
<button type="button" onClick={inc}>
Count: {count}
</button>
);
}Pros & cons
Pros
- Actively maintained by Dan Abramov
- 33M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 42 open issues on GitHub