@reduxjs/toolkit
↔ Official Opinionated redux
Toolset Lib with simplified improved syntax
aka RTK, Redux-ToolKit, Redux, RTK-API, RTK-API-fn, RTK-API-Hook
@reduxjs/toolkit/query
RTK query API to Data Fetch/Cache & replace Thunk
Source: redux
createAsyncThunk()
RTK API fn to Data Fetch from remote endpoint
Source: redux
createSlice()
RTK API fn to setup slice state with input { initialState
, reducers
object, name
}
Source: redux
useDispatch()
RTK API Hook to dispatch an action
configureStore()
RTK API fn to replace createStore
Source: redux
useAppDispatch()
TS typed version of useDispatch() || recommended but pointless
useAppSelector()
TS Typed version for useSelector() || recommended but pointless - just export useSelector as typed version
References
createSlice()
↔ RTK API fn to setup slice state with input {initialState
,reducers
object,name
}useDispatch()
↔ RTK API Hook to dispatch an actionconfigureStore()
↔ RTK API fn to replace createStorecreateAsyncThunk()
↔ RTK API fn to Data Fetch from remote endpoint@reduxjs/toolkit/query
↔ RTK query API to Data Fetch/Cache & replace Thunk