Back in the days I told people I develop back-end AND front-end. Meaning next to PHP I wrote the html/css and a little bit of jquery myself and that was enough.
Today I've came to a point I told people I actually would like to learn a front-end framework and ReactJS it is! Altough ReactJS is not really a framework (first thing I learned today), it is a library. But I've been told ReactJS is working with components and... it... is... awesome!
So to my future self and hopefully you, I though I'll give it a try and tell you how to create your very first ReactJS app.
Make sure you have installed Node 14.0.0 and NPM 5.6 or higher
$ sudo apt update $ curl -sL https://deb.nodesource.com/setup_14.x | sudo bash $ sudo apt -y install nodejs
Verify the version of Node.js installed
$ node -v
Create your project and install Create React App
$ npx create-react-app my-first-react-app
Go into your new project
$ cd my-first-react-app
Run it and high five yourself!
$ npm start
This should open a new tab in your browser to http://localhost:3000/
Thats it! Done. Easy peasy lemon squeezy
Try it yourself and create an awesome tic-tac-toe in an hour yourself: