A boilerplate for a static website built with React.
This template is intended to be very basic, making it easy to understand for beginners.
- Install node.js.
- Install an editor that accepts eslint (e. g. Atom with the plugin linter-eslint), so you get warnings about syntax or code style errors.
- Install dependencies with
npm install
.
- Start the development server with
npm run dev
. - Check the console to see the URL the server runs on.
- Install node.js (Ubuntu)
- Build the app with
npm run build
. - Find the built files in the folder
dist
. Upload them to the root folder of a web server that can serve static files.
You can test the built files by navigating to dist
and run python -m SimpleHTTPServer
. Then open the shown URL in the browser.
Every route (e.g. /about
) contains all the prerendered HTML code and loads the rest of web site with the JavaScript code. Therefore subsequent route changes will load instantly without communication with the server.