Table Of Contents
Introduction
What's included inside Redux Toolkit?
RTK Query
What does RTK Query include?
Conclusion
Introduc...
For further actions, you may consider blocking this person and/or reporting abuse
Hi, I’m learning React and I know react class/function components hooks, custom hook etc, then I guess is time to learn redux,
What do u recommend me start learning redux or redux toolkit
Btw I’m learning first react-query than redux idk if it’s a good idea 😅 is hard know the next step in the react journey
Ty for your post it was useful :)!! If you habe time check my second react app I created, is basic but it let me get solid my basic react knowledge
covid19-dashboard-elvis2280.netlif...
Hi! Thank you so much for the feedback, it is greatly appreciated.
In regards to what order and how/what you should learn, I do not think there is a "wrong" way/order to do it. It is great you are familiar with React and what can be done with it! If you look in the Redux Toolkit documentation, they actually say they intended for Redux Toolkit to become the new standard when writing Redux logic, a lot of people are digging it!
I would say just go for Redux Toolkit, if you are interested in vanilla Redux, it is always something you can go back and read up on later. RTK allows you to do all kinds of things in less, more organized, code. Just have some patience while learning it, don't be afraid of the documentation, and you'll be A-okay!
Thank u so much, I really appreciate your help :), sorry for take your time but you think I can use nextjs without learn redux first, I wanna start developing my portfolio but I don’t know if U should first learn redux. Btw thank u for everything, happy code ;)
No problem!
I think you can learn Next.js without going too deep into Redux, but Next.js uses Redux for state management. So that means, Redux's "store" is used to hold information about the state of the application.
If you are unfamiliar with how an application's state and store works, I would read up on the documentation (the Redux documentation is not that scary, I promise.) Happy coding to you too! Best of luck.
People should learn fundamentals of Redux first, gain a good grasp of its fundamental concepts like Store, Action, Action Creator, Dispatch and Reducer. Then, they can proceed to RTK to help working with Redux easier.
I also learned redux a couple of days back. It's easy then flux I must say. I liked it
I have not yet used Flux, but good to know I started with the better one haha
As for React-Redux, when we are still using class components, then the only way to use React-Redux is by using Connect API, right ? Only when we use Hooks, then we can use Hooks API provided by React-Redux such as useSelector, useDispatch.
It seems that I need to get used to both ways, in anticipating (existing) codebases which use both class components and function components (with Hooks).
I myself have been only using class components in my last project. However, after reading motivation in React official site about Hooks, it's time for me to switch to functional components with Hooks. One thing I should consider when using Hooks, though, is whether 3rd party libraries I have been using, support Hooks in their APIs.
Sometimes, because of this different ways of using class components or Hooks in React, make me think to switch to Angular or Vue which I am still learning too.
Would you recommend porting a large code base using vanilla redux to redux-toolkit? We have typed all our reducer states and actions.
I really don't think it matters what point you decide to transition from vanilla redux to redux-toolkit. Of course it's easiest to initially write all your code using the toolkit if you are planning on implementing later, just to save time and some headaches.
BUT, I also think that by writing you code in vanilla redux first, and then switching over can be very beneficial if you are newer to the react/redux realm. I've found there are ton of different ways to utilize Redux toolkit and you will come across tutorials and documentations showing it's versatility. Understanding your application, your reducers, actions, etc. will help you pick apart other code you may be learning from, so you're not just pattern following without understanding what's really going on. If you're really nervous about breaking your code, clone your repo, and try it out there first!
tldr, go for it. The worst that could happen is you'll learn something new.
To add to that, once you start getting the hang of toolkit and the APIs supplied, it gets to be a lot fun and you can definitely do more with the application.
@phryneas I have some questions about updating state useReducer. Do you think you could help?
I'd recommend going on the Reactiflux discord: reactiflux.com/ There are always people to help there.
Thank you so much!!!
Very informative and concise. Appreciate when everything is so clear, as it gave me a pretty good overview of the tool.
Thanks!!
Thank you! I hope to be posting more articles soon, have been very busy with work (which is a blessing!)