Extended create-react-app starter template.
It contains demos and sample code to quickly get started with react-router, app layout, composition of components, etc.
Built project assumes the app is hosted at the server root, unless homepage
field in package.json
is specified. To create relative paths (when not using client-side routing) use "homepage": "."
.
Firebase hosting (with browserHistory
):
npm install -g firebase-tools
firebase login
firebase init
# now select 'hosting' -> publicDir: build -> config single-page app: yes
firebase deploy
GitHub pages (only hashHistory
works):
- Change
homepage
field inpackage.json
- Run
yarn run deploy:github
- GitHub repo settings should use
gh-pages
Heroku:
# $HEROKU_APP_NAME can be left out
heroku create $HEROKU_APP_NAME --buildpack https://github.com/mars/create-react-app-buildpack.git
git push heroku master
heroku open
When copying HTML snippets, use: http://magic.reactjs.net/htmltojsx.htm