React Redux Toolkit Query Tutorial and RTK Query CRUD Example App

React Redux Toolkit Query Tutorial and RTK Query CRUD Example App

Dave Gray

2 года назад

128,209 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

marzieh mokhtari
marzieh mokhtari - 03.10.2023 21:17

thanks for your great teaching💐

Ответить
Morten Øvrebø
Morten Øvrebø - 28.09.2023 14:08

Nice tutorial! Helped a lot.

One question regarding RTX: I see that both in your tutorial and documentation the flow goes like this:

- Get All Elements
- Update (mutate) one element, then invalidate get all elements
- Get all elements

Seems to be overfetching.Usually when I update one element I would just fetch that updated version and update only that element in the list. Is this not best practice? I can´t figure out how to just fetch the updated element and update that in the list. Do you know?

Ответить
Srinivas Nahak
Srinivas Nahak - 26.09.2023 19:36

Thank you so much for explaining everything so clearly! :)

One suggestion:
Even if you've to make an even simpler app you can, please write and don't copy and paste the code. Because it can get confusing for some viewers. Again, that's just a suggestion.

Ответить
Thimira Akash
Thimira Akash - 13.09.2023 17:31

Thank you very much this is a really good video❣ Would u please tell me that how or from where did u take that ===>tagTypes:['Todo']. I had the idea what was the purpose for using that but need to know that how did u decide that 'Todo' is the tag. Thank you Dave! Cheers..

Ответить
Muhammad Haseeb Farooq Khan
Muhammad Haseeb Farooq Khan - 03.09.2023 10:49

Thank you Dave, You really elaborated every thing along side cases which help us to understand more clearly.

Ответить
Abu David
Abu David - 25.08.2023 16:03

What of the AddTodo has an error from the backend, how do you resolve it.

Ответить
Tunde Adebanjo
Tunde Adebanjo - 27.07.2023 18:01

Very well explained. Thanks Dave

Ответить
Walter Germanes
Walter Germanes - 22.07.2023 18:48

Is it good practice to wrap index using apiprovider?

Ответить
Komil Olimov
Komil Olimov - 30.06.2023 21:26

Thats was awesome

Ответить
Smart Coderz
Smart Coderz - 25.06.2023 13:31

how to you paste the codes without writing them ? :D

Ответить
Aarón Díaz
Aarón Díaz - 17.06.2023 18:08

I'm not really experienced to talk but i have Associate Degree in web development. I have never worked as dev but i graduated when first version of AngularJs was being released and i learned to code with js, php, java, pyhton and SQL with Mysql. Now i'm back to coding for fun and i love how easy everything has become, well maybe not easy for a beginner because most difficult part are concepts but a lot of work has been simplified, rtk query is a perfect example, love it! Thanks great explanation.

Ответить
Rob G
Rob G - 17.06.2023 12:15

Thanks for the great tutorial. I have been dabbling a bit in RTK and so many things clicked for me while I was watching this

Ответить
hatem benechikh
hatem benechikh - 13.06.2023 15:49

a side question , what is the theme that you are using in vscode it look great :D

Ответить
Nahid Faraji
Nahid Faraji - 07.06.2023 01:32

When I clicked on an Individual Todo, it still re-render the all Todos. It's not working as same as the what we have done using createEntityAdapter.
How to fix this ?
By the way, thank you so much for your tremendous Content.

Ответить
Mindblown
Mindblown - 25.05.2023 16:20

Excellent tutorial. Thanks alot.

Ответить
Have fun
Have fun - 22.05.2023 15:24

After createdSlice, createAsyncThunk, and createApi, it seems createApi is the most comfortable if integrate with API.

Ответить
Sagar Ramaswamy
Sagar Ramaswamy - 08.05.2023 09:37

Thanks a lot for the tutorial

Ответить
ABU TAHER
ABU TAHER - 29.04.2023 17:01

Hello
if i want to use authorization headers for RTK Query, can i use direct argument? or have to store on redux store?

Ответить
Abduqahhor Norimmatov
Abduqahhor Norimmatov - 20.04.2023 21:39

thanks

Ответить
Osas Ferguson
Osas Ferguson - 28.03.2023 02:39

Hi Dave, is there a way to trigger the default GET request by the click of a button? Does the "useGetTodosQuery" also provide a getToDos function that can be used to make a GET request on the click of a button just like the other mutation method hooks do?

Ответить
Luke M
Luke M - 25.03.2023 16:32

Is there a way to access the fetched data across the app e.g. in the footer without fetching it again there?

Ответить
Marvellous Adesanya
Marvellous Adesanya - 19.03.2023 19:10

When are we to use async thunk and when are we to use rtk query?

Ответить
Ibeh Micheal
Ibeh Micheal - 20.02.2023 04:27

YOU ARE A GENIUS.....NO 🧢

Ответить
bashful88
bashful88 - 16.02.2023 13:10

How RTK query is related to the redux state and store?

Ответить
Stone Comstock
Stone Comstock - 11.02.2023 20:37

Thank you Dave. Very helpful! I am a little confused about the caching part though, where is the data being cached? Is it in our redux store/state? Or is it separate? For example are we able to target it with a useSelector and use the cached data in other components?

Ответить
Rafael Rossi
Rafael Rossi - 04.02.2023 17:26

Tks sir :)

Ответить
Noelle L
Noelle L - 02.02.2023 15:41

Would love to see transformErrorResponse incorporated and tested by forcing an error within the associated API.

Ответить
CoderDmitri
CoderDmitri - 29.01.2023 20:44

if you are getting an ERROR - App.js:8 Uncaught TypeError: (0 , _redux_api_apiSlice__WEBPACK_IMPORTED_MODULE_2__.useGetAll) is not a function REDUX api .... YOU MUST call the hook with USE at the front and QUERY at the end, otherwise it will NOT work... so name MUST BE: useAnyNameQuery = works; anyNameQuery = fails; useAnyName = fails;

Ответить
Emmanuel Akogwu
Emmanuel Akogwu - 27.01.2023 22:08

Awesome tutorial.....thank you

But I'd like to ask, can one use rtkquery and reactquery for data fetching in React native too?

Ответить
Amin Arabi
Amin Arabi - 20.01.2023 18:30

Hi Dave! Very cool content. Thanks.
I had a question. I'm trying to call the API in a component, and read the value in another component (using lazy queries), however it never shows the result where I want to read it.
I've checked and the value is written to the store, and is actually readable using useSelector with some hacky tricks.
Do you know how can I possibly read the value in the destination component? Thank you!

Ответить
Jig kura
Jig kura - 12.01.2023 20:55

Would it be acceptable to use Redux with React query instead of Rtk Query? It seem like they both serve same/similar purpose. Im currently watching your React Query tutorial so was hoping to implement that in my project that uses redux toolkit.

Ответить
Ahmed Musawir
Ahmed Musawir - 11.01.2023 05:17

This is the best one on the topic by far ... Great job! Thanx!!

Ответить
FrischSticks
FrischSticks - 07.01.2023 23:26

After being stuck for hours on configureStore({ }) you managed to solve my problem. Thank you for this quick and current video!

Ответить
Artemiusz Kuzniecow
Artemiusz Kuzniecow - 24.12.2022 00:28

Thank you so much! Amazing lesson!

Ответить
Ben arbia mohamed taher
Ben arbia mohamed taher - 18.12.2022 12:26

Thanks a lot Dave

Ответить
Rajat Pratap Singh
Rajat Pratap Singh - 11.12.2022 18:34

npx json-server --watch data/db.json --port 3500

Ответить
Geo Mukkath
Geo Mukkath - 08.12.2022 05:31

Loved the tutorial. Just one question, why not use .reverse() method instead of .sort() ? That's far simpler. Let me know if there is a problem that I am not aware of.

Ответить
José Santillan
José Santillan - 26.11.2022 00:11

Marvelous! Thanks man. Keep it that way

Ответить
Duy Tran
Duy Tran - 21.11.2022 22:47

Cool

Ответить
Moctar Sandalo
Moctar Sandalo - 19.11.2022 14:03

I am wondering why my sorting does not work, I also try different way but it still did not worked.

Ответить
Sanjar Kodirov
Sanjar Kodirov - 18.11.2022 12:34

thank you so much for this lesson. i am e project right now. And this video series helping me a lot )

Ответить
Omar Kraidié
Omar Kraidié - 12.11.2022 15:34

I think your vscode theme has an outside effect on the quality of your videos :D
It is just beautiful to look at!

Ответить
Thomas Sleeman
Thomas Sleeman - 09.11.2022 19:53

Hi Dave, thanks for the video. I understand everything you have covered but what about if you want to set up a mutation in apiSlice with data that is a manipulated version of what was fetched from a query? I tried pulling an object array into a component using a RTKQ query hook but when I duplicated the array and tried to make changes to it inside the component I got an error saying that the object elements are read-only.

Ответить
John Connor
John Connor - 08.11.2022 00:13

The best video on RTK Query

Ответить
Boburmirzo Muhibullaev
Boburmirzo Muhibullaev - 07.11.2022 04:52

love your tutorials! Could you make your videos with typescript, please? I think it will another level

Ответить
gabriel torres
gabriel torres - 05.11.2022 19:17

Wow there so much you can do with redux and I thought i knew it all about redux and now i know that i dont.

Ответить
Digital Partner
Digital Partner - 31.10.2022 17:30

my friend dave how are you ? help me i am stackkkkkkk, lol, i finished the backend with RTKQuery , now in the public area when user is not connected yet, there is no authorization set up in the request, so i am getting 401 from the apiSlice when i try to fetch data, what should i do please.

Ответить