❌STOP making this Junior Developer mistake! (ES6 Spread Operator) #javascript #code #tutorial #tips

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

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

nah man juniors know spread operator and dont know Object assign

andTutin
Автор

I’m a junior dev and I’ve never come across Object assign 😂

veedjohnson
Автор

Object assign is senior way, because it's a old method

adivmt
Автор

The object assign won't make a new object, it will modify elon. As opposed to the spread operator which will create a new object that is a combination of both. They do different things and it seems like you don't know the difference.

essamal-mansouri
Автор

Object assign is for merging props and spread for creating new objects. Due reacts storing objects by reference in state you mostly or always need the spread operator for most things.

So it's where you use it and what you use it that makes you look like a junior developer.

Kelz_codes
Автор

I'm still learning JS and spread operator is my favorite, you can do a lot of things with it.

emmanuelmantilla
Автор

Copying objects is computationally expensive.

greendsnow
Автор

Me who 1st time saw the first one 😅 spread operator is ❤️

abhisheksantoshbhambe
Автор

The most important difference is: spread defines properties, whilst Object.assign() sets them said Yevhen Shemet, 4 years ago

simply_the_dev
Автор

Spread operator is my favorite way to update an object inside of state.

KingSimpa
Автор

I feel like a Junior not knowing your junior solution

cristianmargineanu
Автор

Using object assign is not a junior mistake. I doubt junior developers would even be aware of object assign. You can use either. How does using object assign make you a junior? Love your videos mate but this type of stuff is subjective. 🤷‍♂️

intergaming
Автор

You got it backwards. Object assign is what seniors are accustomed to and the spread operator is new and what junior developers will learn initially.

muscleheadzzzz
Автор

It is good but for a simple object.
When you have an object that has another object you can use stringify and parse.
And when you have date and an object in your object you can use structuredClone() ❤❤❤

mohammadrezabahrami
Автор

The matter of fact is, I didn't know the hell about assing function 😅

abdularham
Автор

There is catch. It does not work for nested objects.

MrVinodkumar
Автор

This video teach me the existance of Object.assign thank you

Serzes_
Автор

I'm a junior and one of the senior devs does this. I hate reading his code lol

keifer
Автор

As a junior or begginer i know spread and rest operator

crazyboyrish
Автор

it's not a mistake it's just different.

MduduziDube-re