DEV Community

Anil Rai
Anil Rai

Posted on

Just Joined the Community – Lots of Questions as a Fresher React Developer

Hi, everyone!

I’ve just joined this awesome React Dev community, and as a fresher React developer, I’m excited to learn more and get some guidance.

Context:
I’ve been using React-Redux for state management in my current project. However, I’m finding that it requires a lot of boilerplate code (actions, reducers, etc.), and it's starting to feel cumbersome. I’ve recently come across React Query and I’m considering switching over because it seems to simplify data fetching, caching, and synchronization. However, I’m unsure whether React Query is a good replacement for React-Redux or if it’s more suited for handling server-side data.

What I’ve Tried:
I’ve set up React-Redux in my project and it’s working fine for managing local state and actions, but I’m finding it a bit overkill for certain scenarios, especially when dealing with remote data. I’ve also been experimenting with React Query to manage data fetching from APIs, but I’m still unclear about where it fits in the state management landscape.

Specific Question:
Can I completely replace React-Redux with React Query for state management? Or is React Query meant more for handling server-side data and not for managing client-side UI state? Should I use React Query just for API calls and keep React-Redux for local state management?

I’d love to hear from experienced developers who have worked with both. Any advice on whether React Query can handle what Redux does, or how I can use them together efficiently, would be super helpful. Thanks in advance for your help! 🙏

Top comments (0)