Загрузка страницы

Why you should lift component state up to the URL

"How can I sync component state with the URL?" This is one of the most common questions I see asked in the React community, and in this video we're going to learn why trying to synchronize state between your React app and the URL is a bad idea – and the right way to address this issue.

- 0:00 – Intro
- 2:04 – Implementing sorting in React
- 17:06 – First attempt at shareable URLs: Synchronizing React state
- 20:17 – Fundamental problem with first attempt
- 21:43 – Second attempt at shareable URLS: Hoist state out of React
- 29:13 – Outro

Links:

👉 Demo: https://2022-05-16-hoisting-state-to-url.vercel.app

🧑‍💻 Source on GitHub: https://github.com/samselikoff/2022-05-16-hoisting-state-to-url/blob/main/app/routes/index.jsx

💅 Table component from Tailwind UI: https://tailwindui.com/components/application-ui/lists/tables#component-7b5a46e74e475708d966ca31716f1771

Видео Why you should lift component state up to the URL канала Sam Selikoff
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
19 мая 2022 г. 18:13:43
00:34:27
Яндекс.Метрика