CLEANEST REACT APP [react-router-dom v6] Loader's over useEffects (WHY DOES NO ONE KNOW THIS?)

  Рет қаралды 773

BrightSide Developer

BrightSide Developer

Күн бұрын

Пікірлер: 6
@erickfelix9142
@erickfelix9142 Жыл бұрын
gold here!
@_lakunahkm
@_lakunahkm 5 ай бұрын
hey can u explain how to create page transition in react router dom v6 with createBrowserRouter?
@timattracts
@timattracts 5 ай бұрын
I actually prefer TanStack Router now 😁 - with TanStack Query the tech stack has the best Dev Experience. I would consider checking it out, I have a more recent video about it on my KZbin as well
@aymanechaaba
@aymanechaaba Жыл бұрын
I think this is the cleanest way to fetch data in react by using loaders instead of useEffects, correct me if I'm wrong
@timattracts
@timattracts Жыл бұрын
You are absolutely correct. Because you will have the data already when the component renders the first time. With a useEffect the component renders without the data, then the data gets fetched, that renders with the data. I find it 1000 times cleaner in the code because you can organize your fetches outside of the components and automatically have context with useLoaderData for all the children so you don’t need to props drill or use useContext
@aymanechaaba
@aymanechaaba Жыл бұрын
@@timattracts Remix changed the game bro! I hope we work on a cool project together one day! 😉
Предзагрузка данных через роутинг
24:48
Михаил Непомнящий
Рет қаралды 30 М.
React Router in Depth #6 - Loaders
12:07
Net Ninja
Рет қаралды 60 М.
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 114 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 110 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
Is Tanstack Router Better Than React-Router?
18:00
Jack Herrington
Рет қаралды 39 М.
React Router in Depth #10 - Forms & Actions
11:17
Net Ninja
Рет қаралды 35 М.
React-router-dom 6 - новый синтаксис роутинга. Routes вместо Switch, elements. SPA и MPSa на RRD6
19:54
WebDev с нуля. Канал Алекса Лущенко
Рет қаралды 33 М.
Learn React Router v6 - Full Course
1:43:23
freeCodeCamp.org
Рет қаралды 61 М.
Learn React Router v6 In 45 Minutes
46:20
Web Dev Simplified
Рет қаралды 570 М.
React Redux Tutorial For Beginners | Redux Toolkit Tutorial 2021
53:26
Avoid using `isLoading` for Data Fetching in React
12:35
CoderOne
Рет қаралды 16 М.
AM Coder - React Router 2024 - #3 - Params, useParams, loaders, useLoaderData
13:01
Web Development with Alex Merced
Рет қаралды 233
Solving a practical intermediate react interview challenge
13:28
Web Dev Cody
Рет қаралды 99 М.
React Router v6.4 ( v6.4.1 ) - Fetch data with loaders
27:50
Weibenfalk
Рет қаралды 12 М.