The Right Way To Merge JavaScript Objects

preview_player
Показать описание
Ordering matters when it comes to merging objects together in JavaScript and TypeScript, and it makes a big difference when you are building your reusable React components.

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

I'd love to see you do a series on optimize my code. Some of us are the only developer in our departments and we don't get the value add of a principle software developer

jazhar
Автор

jack please do a video on your vscode and terminal setup

sivaganesh
Автор

I love the theme color for typescript, please share the font and setting please

OmkarBhoir
Автор

Skimmed through your videos and couldn’t find one about your terminal setup., maybe I missed one but I loove your terminal’s look and feel. Can you please make a video on that? As they say, no matter how powerful your character in game is unless it looks well

tarantulanebula
Автор

Hi 👋, which extension are you using to get values on hover

I just love your short reels whenever I’m on the go ❤ and have time

mrniamster
Автор

Question: how do you highlight sections of your code?

farzadmf
Автор

you make a revolution man! :D Im joking ofc... :)

DarkoVeselinovicc
Автор

We need object merging in js, or at least state merger in react. I've specifically made a polyfil for it, just to be able to merge react states like they do in class components.

anasouardini
Автор

Since you're a hardcore react dev I'm curious

Do you find some stuff about some hooks weird?

Like how useState if you pass in a function call it'll be executed everytime on re-renders but the value is ignored, however putting that inside an arrow function it doesn't do that (like which dev can look at that and predict that's what that does)

Or with useEffect where the 1st arguement you pass in (the function). The function has 2 parts the statements and return, the return isn't executed the first time... Then everytime after that the return is executed first then the statements for the cleanup

This seemed really weird to me and it still does, curious about your thoughts on it

adityaanuragi
Автор

Isn't this just a CSS cascade issue rather than an object merge specific issue?

levett_
Автор

the object merging lesson is valid and pretty useful...

...but do not forget, that using the style attribute is an anti-pattern. don't do that folks, please :)

indriq