🌶️ take - React dependency arrays are evil

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Lint tools can very easily warn you about this

justinmoore
Автор

I like the automatic stuff that solid and similar provide but sometimes you really do just want to rerun something after a certain state changes, even if you use other state inside

samuelgunter
Автор

Quite ironic where React is not reactive.

Also, Svelte is the truly reactive framework out there.

thedelanyo
Автор

could you please explain how dependency array work?

yokevideo
Автор

note: React Query is now TanStack Query due to having ports for other libraries

Zeragamba
Автор

Linting and formatting on save fix this problem

JonathanRose
Автор

This is fine to be aware of but limiting does help you with this as well

krisnrg
Автор

So the solution seems to not use react ?

arakwar
Автор

Does nextjs also has an option to prevent this?

professor_ozzy
Автор

Every time I watch your videos, I feel like all I’ve learned is the wrong stuff.

jaircarbajal
Автор

This seems like an oversight by React. The workarounds I've seen to purposefully trigger an effect only when a subset of the dependencies change are scary...

nivaldolemos
Автор

Bigger issue is you don't use eslint

lostinchina
Автор

Instead of using lint and formatting you are Asking to install a third party liberary 🤦🤦😂😂

saniddhyanigam
Автор

...or just use a framework without the trash approach to reactivity called "hooks".

shapelessed
Автор

Missing Svelte there.. talks about qwik and not svelte? What the hell

danvilela
Автор

Clickbait. If you are just learning, skip this.

elgalas
Автор

Just stop using React. Problems werent. Sry but im serious.

MAGIHAG
visit shbcf.ru