A step-by-step example of how to leverage ES6+/ES2015+ in React by rewriting (an adapted version of) the official React tutorial.
Assuming you have a version of node installed, install nvm and then close & reopen your terminal.
Install the latest stable version of node:
nvm install nodeFork this react-esnext repo and create a local clone (be sure to replace YOUR-USERNAME with your own):
git clone https://github.com/YOUR-USERNAME/react-esnext.gitChange to final directory:
cd react-esnext/finalInstall all of the dependencies:
npm installStart API server (running at http://localhost:3000/):
npm run start:apiIn a separate console window/tab, start the web server (in the same directory):
cd react-esnext/final
npm run startOnce the initial bundle is built, visit http://localhost:8080/.
Each step in the workshop builds on top of the previous one. You can begin at the Start. Afterwards follow these steps: