DEV Community

Cover image for Javascript to know for Reactjs

Javascript to know for Reactjs

okeken on August 08, 2022

Learning React js should not be that difficult if you're already comfortable with some concepts in Javascript. One of the interesting things about ...
Collapse
 
smlka profile image
Andrey Smolko

I think there is a typo and others is an array instead of string. A correct snippet is:

const users = ['John', 'Mike', 'Cole', 'Bekky']
const [a,b, ...others] =users

console.log(a,b, others) // 'John', 'Mike', ['Cole, Bekky']
Enter fullscreen mode Exit fullscreen mode
Collapse
 
okeken profile image
okeken • Edited

Thanks for catching that! I have updated the code.

Collapse
 
clay profile image
Clay Ferguson

I like TypeScript because it catches 99% of my bugs during the build step. I love knowing that every variable is perfectly type-safe and every typo is caught immediately. I guess this article is about JS because that's always the "core" of everything still, even when TS is used, of course, which is fine.

Collapse
 
okeken profile image
okeken

I agree, typescript is a superset of JavaScript. So it's great we figured out the basics first.

Collapse
 
anasnmu profile image
Anas Nabil

Thanks for sharing, this article is very good for every beginner who wants to know some of the most important basics, keep going 🌹

Collapse
 
okeken profile image
okeken

Thanks for your kind words, yeah It'll be handy for anyone just starting out.

Collapse
 
hiren_ramoliya1 profile image
Hiren Ramoliya • Edited

This article is very much important for beginners who just started learning react and its feel like basic cheatsheet of javascript before learning react 😀. Thanks man for this article. 👏

Collapse
 
adetutu777 profile image
Adetutu Gbangbola

👏👏👏

Collapse
 
okeken profile image
okeken

Thanks for reading!

Collapse
 
andrewbaisden profile image
Andrew Baisden

Thanks for the deep dive into JavaScript ES6 its a good read.

Collapse
 
okeken profile image
okeken

I'm glad you find it helpful.

Collapse
 
vebradev profile image
Vebra

setData=(response) Excuse me, but what? I'm glad you decided to come up with this article, but please, have somebody to review it before posting it. Formatting is weird & inconsistent as well.

Collapse
 
okeken profile image
okeken

Hi Vebra,

Seems I missed that, I've gone ahead to update it accordingly.

Collapse
 
vebradev profile image
Vebra

@okeken, hope I didn't sound bad with my comment - just wanted to get my point across. I believe lots & lots of new developers will be reading this article of yours, which they will use as a source of truth at least to some extent, therefore it matters how well written this should be.
Other than that - mad props.

Thread Thread
 
okeken profile image
okeken

I appreciate man 🙌🙌

Collapse
 
umamahesh_16 profile image
Umamaheswararao Meka

Brilliant Article👌👌👌

Collapse
 
okeken profile image
okeken

Thanks for your kind words.

Collapse
 
imiahazel profile image
Imia Hazel

Thanks for sharing such a thorough article. For me, a refresher course in ES6.

Collapse
 
okeken profile image
okeken

I am glad you find it heplful!

Collapse
 
devgancode profile image
Ganesh Patil

Thanks for sharing this article!

Collapse
 
okeken profile image
okeken

You're welcome

Collapse
 
izu33 profile image
Izundu Dan-Ekeh

This is super helpful!!!

Collapse
 
okeken profile image
okeken

I am glad you find it helpful!

Collapse
 
nitinreddy3 profile image
Nitin Reddy

Ah, this article helps a lot. Thanks @okeken for sharing this.

Collapse
 
okeken profile image
okeken

I'm glad you find it helpful.