Facebook has written a very good introduction for the React library. You can find it from React Tutorial.
The tutorial can be run through without any installations by starting from this code template in codepen. And following the tutorial through starting here.
Once you have the application running in your local environment (nodejs or docker) you can edit the files in your editor and see the changes immediately in the browser window here http://localhost:8000.
- Git
- nodejs or docker
- Any shell, console or terminal.
- Any editor. We recommend sublime, atom or vscode.
You are going to have to sign up to github to clone code. If you want to avoid that, you can always just download the code (By clicking the green Clone or download -button).
- Install nodejs.
- Open your favorite shell.
- Clone this repository:
git clone https://github.com/koodi101/lesson1-react-tictactoe.git
- Go to the cloned directory:
cd lesson1-react-tictactoe
. - Install dependencies
npm install
- Run the app
npm start
- Open browser in http://localhost:8000
- Install Docker (download link for mac).
- Open your favorite shell.
- Clone this repository:
git clone https://github.com/koodi101/lesson1-react-tictactoe.git
- Go to the cloned directory:
cd lesson1-react-tictactoe
- Run the app
docker-compose up
- Open browser in http://localhost:8000
- Install heroku cli
- Create new app in Heroku
- Clone the repository
git clone https://github.com/koodi101/react-tictactoe.git
- Go to the cloned directory:
cd lesson1-react-tictactoe
- Login to heroku on command line
heroku login
- Add heroku remote to git configuration
heroku git:remote -a \<app name\>
- Tell heroku to also install dependencies for development use
heroku config:set NPM_CONFIG_PRODUCTION=false
- Tell the application to use port 80 instead of 8080
heroku config:set PORT=80
- Push the code to heroku
git push heroku master