ES6 Fundamentals for React Applications
Don’t worry about learning all of the new features introduced in the ES6 spec, just focus on these core ones that are used most frequently in React codebases!
Topics To Learn
The ES6 features any aspiring React dev should learn are:
- let vs. const
- template literals
- string interpolation
- arrow functions
- ES6 classes
- destructuring assignments
- spread operator
I also snuck in two Array
methods that are widely used while building React components:
These features were chosen based on my experience building React applications over the past several years.
Cheat Sheet
I’ve created a cheat sheet with examples and explanations of the features above. It is executable in a node environment, feel free to fork it and add to it if you think there’s anything I’ve forgotten.
Find a gist with the cheat sheet here: https://gist.github.com/bambielli/25dd9778f286fe04338092c87b145fc2
And an embedded version below:
Comments