React State Management with React Hooks and Context API Simple alternative for your React-Redux App Jan Ranostaj
● Simple way to setup React State management, so you can remember it without googling each time 😀 ● Forget about using “connect” “mapStateToProps” and other unnecessary boilerplate 🙏 ● Combining Context API with useReducer hook makes easy access to the data anywhere in the app 👊 ● Do not need to pass data using “props” 👌 ● Easy to test independently 😏 5 Reasons
Use with useState Hook
Global state configuration ./state.js
Use in your App
Access and Update state in Components
Use with useReducer Hook
Global state configuration ./state.js
Setup simple Reducer
Use in App
Read from state in the app
Update State in the app
Example with useReducer Hook https://codesandbox.io/s/use-reducer-fd2no Example with useState Hook https://codesandbox.io/s/react-state-with-context-api-clem6 Time for code examples Thanks 😏 Jan Ranostaj

React App State Management with react hooks and context api