filmov
tv
STOP using useState, instead put state in URL (in React & Next.js)

Показать описание
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship).
👉 Discord: all my courses have a private Discord where I actively participate
⏱️ Timestamps:
0:00 Examples
0:41 Benefits
2:38 Example overview
4:24 useState
6:56 Synchronize URL with useEffect
7:30 History API
7:54 Query string definitions
11:18 Problems with useState approach
11:58 Switch to URL for state
12:26 useSearchParams
13:35 Link component
16:11 Server component (searchParams)
17:13 Caveat 1: replace vs push
17:57 Caveat 2: unknown values
18:18 Caveat 3: no values
18:32 Caveat 4: url-encoded values (URLSearchParams)
20:47 Real-world use cases
#webdevelopment #programming #coding
👉 Discord: all my courses have a private Discord where I actively participate
⏱️ Timestamps:
0:00 Examples
0:41 Benefits
2:38 Example overview
4:24 useState
6:56 Synchronize URL with useEffect
7:30 History API
7:54 Query string definitions
11:18 Problems with useState approach
11:58 Switch to URL for state
12:26 useSearchParams
13:35 Link component
16:11 Server component (searchParams)
17:13 Caveat 1: replace vs push
17:57 Caveat 2: unknown values
18:18 Caveat 3: no values
18:32 Caveat 4: url-encoded values (URLSearchParams)
20:47 Real-world use cases
#webdevelopment #programming #coding
STOP using useState, instead put state in URL (in React & Next.js)
Why I Don’t Use useEffect In My React Components
Why I avoid useEffect For API Calls and use React Query instead
React Hooks Tutorial - 3 - useState with previous state
10 React Antipatterns to Avoid - Code This, Not That!
Goodbye, useEffect - David Khourshid
Top 6 React Hook Mistakes Beginners Make
Save State to LocalStorage & Persist on Refresh with React.js
React Js How to REFRESH a Component | Best Practice
React for the Haters in 100 Seconds
Most Beginner React Developers Do This Wrong
Full React Tutorial #8 - Using State (useState hook)
Stop using addEventListener and useRef in React
useReducer is BETTER than useState | React Hook useReducer Tutorial
If you're struggling to learn to code, you must watch this
Vite in 100 Seconds
Learn React useReducer Hook with Examples
React State Management – Intermediate JavaScript Course
6 State Mistakes Every Junior React Developer Makes
Every Beginner React Developer Makes This Mistake With State
Learn to use State in React in 19 minutes (for beginners)
Props from Child to Parent Component (Hack)
Stop using JSON Web Tokens. Use Cookies & Server Sessions instead
How To Save React State On Page Refresh
Комментарии