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

  • Опубликовано: День назад

    ByteGradByteGrad
    подписчиков: 73 тыс.

    👉 NEW React & Next.js Course: bytegrad.com/courses/professi...
    👉 Professional JavaScript Course: bytegrad.com/courses/professi...
    👉 Professional CSS Course: bytegrad.com/courses/professi...
    👉 Discord: all my courses have a private Discord where I actively participate
    🔔 Email newsletter (NEW course out soon!): email.bytegrad.com
    ⏱️ 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
    8:58 Next.js useRouter
    10:20 location.search
    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

Далее

Zod Tutorial - All 10 places for Zod in your React / Next.js app

49:04

These 2 UI Libraries Are The Perfect Combo

5:03

These 2 UI Libraries Are The Perfect Combo

Josh tried coding

Просмотров 59 тыс.

РАЗВОД У ОФИЦИАЛА ЛАДА

33:43

РАЗВОД У ОФИЦИАЛА ЛАДА

Лиса Рулит

Просмотров 1,1 млн

Слово пацана. Кровь на асфальте - отец Андрей Ткачёв

08:41

Слово пацана. Кровь на асфальте - отец Андрей Ткачёв

Протоиерей Андрей Ткачёв

Просмотров 211 тыс.

Stop using div in React (+ Fragment, Semantic Tags)

15:48

Stop using div in React (+ Fragment, Semantic Tags)

ByteGrad

Просмотров 105 тыс.

I DONT USE NEXT JS

54:01

I DONT USE NEXT JS

ThePrimeTime

Просмотров 186 тыс.

Search Parameters Full Guide - How to Implement with Next.js

22:25

Search Parameters Full Guide - How to Implement with Next.js

Adam Richardson

Просмотров 3 тыс.

Goodbye, useEffect - David Khourshid

29:59

Goodbye, useEffect - David Khourshid

BeJS

Просмотров 447 тыс.

NextJS Tutorial - All 12 Concepts You Need to Know

44:38

NextJS Tutorial - All 12 Concepts You Need to Know

ByteGrad

Просмотров 54 тыс.

cn() - Every Tailwind Coder Needs It (clsx + twMerge)

7:46

cn() - Every Tailwind Coder Needs It (clsx + twMerge)

ByteGrad

Просмотров 72 тыс.

Why you should lift component state up to the URL

34:27

Why you should lift component state up to the URL

Sam Selikoff

Просмотров 25 тыс.