Loading...

The best React Query course – learn react-query for free by practicing in browser

The best React Query course – learn react-query for free by practicing in browser

React is an amazing library. Launched in 2013, it wouldn’t be wrong to say that it is one of the best things that happened to frontend web development in the last decade. However, there are certain obvious problems with React. The major one is lack of “how to do X”. This might be powerful for some in a way as it allows you to do most things in whatever way you’d like.

Network Requests in React

Consider network requests. Performing network requests for getting/mutating information from a backend server is inevitable in a medium to large scale app. There is no standard practice in React to follow for making network calls, hence, most people wind up with something like this:

function MyComponent() {
useEffect(() => {
fetch(‘…’).then(data => data.json()).then(data => setData(data))
}, [])
}

This is not wrong, but has multiple issues:

How do you cache these requests?
How will you re-use these requests?
How will you mark the data as stale and refetch the request, say if the user comes back after 20-30 minutes on a realtime dashboard?
How will you share this data with other components without making another HTTP request? (biggest problem imo)

All of these problems are solvable if you sit down and try writing your own network client. However, your time is precious and should be focused on writing the business logic of your application and custom code, instead of something that is readily available – React Query.

Introducing React Query

React query is one of a few good solutions out there (useSWR, apollo, etc.) but is feature packed, comes with great devtools and is easy to setup. It fits in nicely and flawlessly with your React components and solves all the problems mentioned above.

At codedamn, we are trying to build a singular platform where you can learn React end-to-end with best practices and ecosystem. I’m glad to announce that react-query is our latest course addition to it. To make it better, this course is 100% free of cost – including all the exercises and hands-on practice. You can enrol yourself in the course from this link: Learn react query from codedamn

This is, like other courses here, an interactive course where you get to play with the code all the time – we give you a full blown environment in cloud, connected to your browser with a dead simple UI. Here’s the sneak preview from one of the course items:

Interactive lab inside react-query course

Codedamn learning paths

This react query course is a part of codedamn’s frontend learning path and react mastery learning path. If you’re not sure what to do before/after this React Query course, it is a good place to start. All the best.

Sharing is caring

Did you like what Mehul Mohan wrote? Thank them for their work by sharing it on social media.

0/10000

No comments so far