Why React 'Hates' Arrays, Objects and Functions

preview_player
Показать описание
The mechanics of React make it difficult to manage arrays, objects and functions because they are compared by reference and not value. Let's dig into the mechanics of this and tell you how to deal with it. This will help you understand React better and make it easier to build stable React 18, NextJS or Remix applications.

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

Keep these shorts coming.
Love'em.

sahej
Автор

Great explainer going more in depth with how React compares things in dependency arrays. Understanding fundamentals like this is key to working good React code.

gmssoberyahsharahla
Автор

What a wealth of knowledge this channel brings

tonybrown
Автор

Can't wait 'til we get proper Records and Tuples in ECMAScript!

download
Автор

Great video.. on point, clear and important to know information 💪🏻

josebaiturregui
Автор

Do you suggest using these hooks for ALL arrays, objects, and functions, or are there specific scenarios you would suggest not using these hooks?

itschriscarrillo
Автор

That's the deceptive part about dynamic languages it's hard to tell which variables are being compared as references versus as values.

Rust_Rust_Rust
Автор

Nice video, can u do a video about signals? (Talking about Solid signals)
And do you think it will be used in react in the future?

jvitormelo
Автор

I am sure this is why we have array functions that create new a new array like map

rafaricfi
Автор

I guess and tupples and records are finally available everywhere it will make things so much easier. Just had a look they are already on stage2 ♥️

victorlongon
Автор

What about class components? A lot of projects stills use them

LaLoses
Автор

You forgot the most common one, if you have a non-changing object, you can define it outside the component.

zentali-meditation
Автор

let a = []; let b = []; let c = JSON.stringify(a); let d = JSON.stringify(b); c === d // true

terrythompson
join shbcf.ru