Migrate state management from Redux to Jotai
With Redux
import { useSelector, useDispatch } from "react-redux"; import { setCategory, initCategory, setCategoryName, setCategoryStatus } from '../../actions/category'; const Category = props => { const { category, status } = useSelector(state => { return state.category }); const dispatch = useDispatch(); dispatch(...); dispatch(...); dispatch(...); ... }import { Provider } from "react-redux"; <Provider store={store}> <App /> </Provider>
With Jotai
Advanced Jotai
Last updated