1 Month React Machine Coding + September Sessions Bundle
https://topmate.io/frontendmaster/117...
Code:
https://github.com/rahuulmiishra/toolkit
How to set headers for specific API:
getAllTodos: builder.query({
query: function() {
return {
url: "/todos",
headers: { headerKey: "headerValue" },
};
},
}),
How to get API data, re-renders the component once data is updated.
const allTodosSelector = apiSlice.endpoints.getAllTodos.select();
// Use the selector function with the state
const allTodos = useSelector(function(state) {
return allTodosSelector(state) } );
mastering rtkqeury
how rtk query work
working with rtk query in react
rtk query full course
rtk course
rtk learn
redux toolkit query
fetchBaseQuery rtk
Multiple Slice rtk
unwrap and refetch rtk
Invalidating Data: Purging Cache rtk
Tag Types: Provides and Invalidate - rtk
Optimistic Updates with rtk
Fetch on Focus and Reconnect rtk
Optimistic Updates with rtk
Content:
00:00:00 Intro
00:00:23 Agenda
00:02:02 Redux+API mental model
00:07:24 RTK Query Mental Model
00:12:06 ToDo App Walkthrough
00:13:06 Creating a todo app
00:21:30 Issues with making API call in useEffect
00:30:10 Adding RTK Query
00:36:00 Consuming API
00:47:40 baseQuery usage
00:49:50 fetchBaseQuery
00:53:00 transforming Response
00:56:00 triggering API on click
01:08:00 Multiple Slice: Bad Practice
01:16:00 Multiple Slice: Good Practice
01:20:00 RTK and Dev Tools
01:24:00 Add Todo: POST Method
01:30:00 unwrap and refetch
01:34:10 Tag Types: Provides and Invalidate
01:36:40 Invalidating Data: Purging Cache
01:39:20 Fetch on Focus and Reconnect
01:43:20 Optimistic Updates
01:49:20 setting headers
01:50:40 prefetching: 2 Ways
#redux #reduxtoolkit #rtkquery #reactjs #frontend #reduxtoolkitquery #rtkquery
Watch video RTK Query (Redux Toolkit Query) - Full Course in Hindi by Frontend Master online, duration hours minute second in high quality that is uploaded to the channel Frontend Master 06 September 2024. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 1,775 times and liked it 89 visitors.