Tag: ecmascript-6

57 votes
30 answers
2.6K views
How to add multiple classes to a ReactJS Component?

I am new to ReactJS and JSX and I am having a little problem with the code below. I am trying to add multipl

avatar
Forrest
0 1 0 9
asked 07 September, 2021
63 votes
30 answers
2.3K views
How to update nested state properties in React

I'm trying to organize my state by using nested property like this: this.state = { someProperty: {

avatar
Thurman
0 1 0 9
asked 07 September, 2021
52 votes
10 answers
1.7K views
What's the difference between "super()" and "super(props)" in React when using es6 classes?

When is it important to pass props to super(), and why? class MyComponent extends React.Component { constru

avatar
Majorie
0 1 0 9
asked 07 September, 2021
61 votes
10 answers
1.1K views
Using Node.js require vs. ES6 import/export

In a project I'm collaborating on, we have two choices on which module system we can use: Importing modu

avatar
Chaya
0 1 0 9
asked 07 September, 2021
57 votes
30 answers
1K views
What's the difference between using "let" and "var"?

ECMAScript 6 introduced the let statement. I've heard that it's described as a local variable, but I

avatar
Basil
0 1 0 9
asked 07 September, 2021