Why I avoid useEffect For API Calls and use React Query instead
Skills:
React90%
If you are like me, always using use effect whenever you need to grab data from an API then wait for it to be fetched and let the React component render it, Well, this is what most people usually do too! Don't surprised cause it's the most obvious way and straightforward way to do it. But we never thought about improving it right? Likely for us, the team behind React Query built this amazing library to solve this problem and simplify our lives as developers. No more effect, the code is simple and maintainable, anyone can read through the code and it handles all the fetching states for you!
⭐ Timestamps ⭐
00:00 Intro
00:37 Why React query?
01:32 What's wrong with useEffect?
03:53 Same code but in React Query
05:43 So much easier code!
08:06 No need for a global store (aka Redux)
13:35 React Query cache is so smooth
16:30 Mutations makes it simpler
⚡️ Redux Alternatives Repo
https://github.com/ipenywis/react-query-useEffect
🧭 Build Login/Register API Server w/ Authentication | JWT Express AUTH using Passport.JS and Sequelize
https://youtu.be/VWEJ-GhjU4U
🧭 Turn Design into React Code | From prototype to Full website in no time
https://youtu.be/0xhu_vgKZ8k
🧭 Watch Tutorial on Designing the website on Figma
https://youtu.be/SB3rt-cQZas
🧭 Watch Create a Modern React Login/Register Form with smooth Animations
https://youtu.be/-bll7l-BKQI
🧭 Debug React Apps Like a Pro | Master Debugging from Zero to Hero with Chrome DevTools
https://youtu.be/_rnxOD9NKAs
🧭 Master React Like Pro w/ Redux, Typescript, and GraphQL | Beginner to Advanced in React
https://youtu.be/M_Oes39FNuk
🧭 Learn Redux For Beginners | React Redux from Zero To Hero to build a real-world app
https://youtu.be/_rnxOD9NKAs
🧭 Introduction to GraphQL with Apollo and React
https://youtu.be/eCO6MvvRhXk
🐦 Follow me on Twitter: https://twitter.com/ipenywis
💻 Github Profile: https://github.com/ipenywis
Made with 💗 by Coderone
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from CoderOne · CoderOne · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Laravel CMS | N-01 | Getting Started and Environment Set Up
CoderOne
Laravel CMS | N-02 | Routes, Controllers and Views
CoderOne
Laravel CMS | N-03 | Dealing With Assets and Page Layouts
CoderOne
Laravel CMS | N-04 | Migration, Models and Adding Categories
CoderOne
Laravel CMS | N-05 | Showing Added Categories, and Session Messages
CoderOne
Laravel CMS | N-06 | Edit\Remove Categories using AJAX and Popups
CoderOne
Laravel CMS | N-07 | Add New Post
CoderOne
Laravel CMS | N-08 | Creating a Basic Laravel Blog
CoderOne
HTML5 Canvas For Beginners | Getting Started | #01 with Webpack
CoderOne
HTML5 Canvas For Beginners | Drawing Basic Shapes | 02
CoderOne
HTML5 Canvas | Drawing Text With Circles | Part 01
CoderOne
HTML5 Canvas | Text Animation and Circle Collision | Part 02
CoderOne
Complete Guide To Web Development In 2018
CoderOne
AJAX & JSON Explained | Examples
CoderOne
Visual Studio Code Web Development Setup and Extensions
CoderOne
Electron Build Desktop Apps HTML/CSS/JS - Getting Started 01
CoderOne
Electron Build Desktop Apps HTML/CSS/JS | Creating Windows and Processes 02
CoderOne
Electron Build Desktop Apps HTML\CSS\JS | Dialog, Sessions and Cookies 03
CoderOne
Electron Build Desktop Apps HTML\CSS\JS | Custom App Menu & Context Menu 04
CoderOne
Electron Build Desktop Apps HTML\CSS\JS | Package, Build and Deploy your App 05
CoderOne
Node.js Brief Beginners Introduction #01
CoderOne
Node.js How Modules Works & NPM #02
CoderOne
Node.js Working With Events and Event Emitter #03
CoderOne
Node.js File System (Read and Write) FS 04
CoderOne
Node.js Create a Basic Server Using Express 05
CoderOne
Json Web Token Authentication JWT Explained Securing API
CoderOne
CSS Flex Box Design | Practical Examples |
CoderOne
API How It Works With Practical Examples
CoderOne
MongoDB Getting Started 01
CoderOne
MongoDB Working with APIs and Practical Examples
CoderOne
Create a Command Line Interface (CLI) Using Node JS #01
CoderOne
Create a Command Line Interface (CLI) Using Node JS 02
CoderOne
Build React Apps | Introduction And Getting Started #01
CoderOne
Build React Apps | Working With Components And Multiple Rendering #02
CoderOne
Build React Apps | App State Management | Practical Examples #03
CoderOne
Build React Apps | Getting Started With Flux (Intro) #04
CoderOne
Build React Apps | Create a Clock Timer Using React 05
CoderOne
Build React Apps | Create a Clock Timer Using React 05 | PART2|
CoderOne
CSS Preprocessors Getting Started | SASS and LESS | Practical Examples
CoderOne
Regex Introduction | Learn Regular Expressions 01
CoderOne
PHP VS Node.js Which is Best For Web Development
CoderOne
Drag and Drop Using Native Javascript 01
CoderOne
Drag And Drop Using Native Javascript 02
CoderOne
Master Git (Version Control) in One Video From Scratch
CoderOne
Let's Learn The New Javascript ES6 Class Syntax
CoderOne
Let's Create A BlockChain On Node.js
CoderOne
Best Online Code Editors For Web Developers
CoderOne
Let's Create a Modern Login Form on React #01
CoderOne
Let's Create a Modern Login Form on React #02
CoderOne
Laravel CMS | N-09 | Admin Registration
CoderOne
Laravel CMS | N-10 | Login and Authentication
CoderOne
Let's Create a Twitter Bot (Listen and Retweet)
CoderOne
Rapid Webpage Creation With Emmet (HTML & CSS)
CoderOne
Create Popups and Modals Using Native Javascript, HTML and CSS
CoderOne
Promises and Callbacks on Javascript With Practical Examples
CoderOne
Create Collapses using Native Javascript, HTML and CSS
CoderOne
Let's Learn Typescript (Javascript Devs) | Getting Started 01
CoderOne
Let's Learn Typescript | Interfaces and Generic Types (The Typing System) 02
CoderOne
Let's Learn Typescript | Work With Classes, Modules and Enums 03
CoderOne
Let's Learn Typescript | React and Webpack With TS 04
CoderOne
More on: React
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
How to Build a Next.js App in 30 Languages (Without Losing Your Mind)
Dev.to · Iurii Rogulia
Building True Vector PDF Export in the Browser with fabric.js
Dev.to · morestrive
Day 0 — visual concept for a small cloud platform
Dev.to · Danilo Eduardo Lopez Corozo
Part I: Don't Wait for Data. Render What You Know.
Dev.to · Pratik Goswami
Chapters (8)
Intro
0:37
Why React query?
1:32
What's wrong with useEffect?
3:53
Same code but in React Query
5:43
So much easier code!
8:06
No need for a global store (aka Redux)
13:35
React Query cache is so smooth
16:30
Mutations makes it simpler
🎓
Tutor Explanation
DeepCamp AI