Skip to content
βš›οΈ πŸš€ A progressive static site generator for React.
JavaScript TypeScript CSS
Branch: master
Clone or download

Latest commit

Latest commit d1619a7 May 29, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update issue templates Sep 1, 2019
archives/old-examples πŸš€ 7.2.0 maintenance (#1293) Sep 1, 2019
docs Update documentation to include tiiny.host for hosting (#1407) May 21, 2020
media Fix images (#1305) Sep 25, 2019
netlify-www πŸš€ 7.2.0 maintenance (#1293) Sep 1, 2019
packages v7.4.0 May 30, 2020
.eslintignore πŸš€ 7.2.0 maintenance (#1293) Sep 1, 2019
.eslintrc.js Make resolution cross-env in filesystem plugin and base package (#1128) Apr 16, 2019
.gitattributes Mark .sketch file as binary (#1376) Feb 7, 2020
.gitignore V7 (#1079) Apr 1, 2019
.npmignore Reduced the size of npm installation by removing the `archives` direc… Dec 19, 2018
.prettierrc Move examples to separate directory for now Dec 7, 2018
.travis.yml Remove deprecated travis option Jul 18, 2019
CHANGELOG.md Prepare CHANGELOG for 7.4.0 (#1429) May 30, 2020
CODE_OF_CONDUCT.md Switch to Spectrum for community May 24, 2018
CONTRIBUTING.md Add inline script hashes to DocumentProps (#1373) Feb 6, 2020
LICENSE πŸš€ 7.2.0 maintenance (#1293) Sep 1, 2019
README.md remove staticgen from sites using section as they use gatsby now (#1388) Mar 2, 2020
RELEASE.md πŸš€ 7.2.0 maintenance (#1293) Sep 1, 2019
ROADMAP.md πŸš€ 7.2.0 maintenance (#1293) Sep 1, 2019
lerna.json v7.4.0 May 30, 2020
package.json πŸš€ Release 7.3.0 (#1375) May 21, 2020
yarn.lock πŸš€ Release 7.3.0 (#1375) May 21, 2020

README.md

React Static Logo

Travis CI Build Status David Dependancy Status npm package v npm package dm Join the community on Spectrum Github Stars Twitter Follow



You are viewing the docs for v7 of React Static. You can browse all historical versions via Github branches!

React Static

A progressive static-site generator for React.

React-Static is a fast, lightweight, and powerful progressive static site generator based on React and its ecosystem. It resembles the simplicity and developer experience you're used to in tools like Create React App and has been carefully designed for performance, flexibility, and user/developer experience.

Features

  • βš›οΈ 100% React (and friends!)
  • πŸš€ Blazing fast builds and performance.
  • 🚚 Data Agnostic. Supply your site with data from anywhere, however you want!
  • βœ‚οΈ Automatic code and data splitting!
  • πŸ’₯ Instant navigation and page views
  • β˜”οΈ Progressively Enhanced and mobile-ready
  • 🎯 SEO Friendly.
  • πŸ₯‡ React-centric developer experience.
  • 😌 Painless project setup & migration.
  • πŸ’― Supports 100% of the React ecosystem. Including CSS-in-JS libraries, custom Query layers like GraphQL, and even Redux.
  • πŸ”₯ Hot Reloadable out-of-the-box. Edit React components, styles and even data in real-time.

Sites Built with React-Static

See a list of sites

Quick Start

  • Install the CLI tool:
$ npm i -g react-static
# or
$ yarn global add react-static
  • Start a new project!
$ react-static create
  • Need some help?
$ react-static --help

Documentation

Migration from a previous version?

The CHANGELOG contains information on breaking change for each major version. The latest breaking changes along with their migration tips are located here

What is a progressive static site?

A progressive static site is a website where every statically exported HTML page is an entry point to a fully-featured automatically-code-split React application. Just like a normal static site, static progressive websites are capable of loading initial landing pages very quickly, but then extend the user experience by transforming invisibly into a single-page React application.

Once a progressive static site page has loaded its React application it can then do amazing things!

  • Prefetch page assets
  • Instantly navigate between pages
  • Provide interactivity not possible in normal static sites
  • Subscribe to and display real-time and dynamic data
  • Anything you can imagine within a React application!

How does it work?

Flow Chart

React Static gathers your data, and templates together and intelligently splits them into bite-size static files using webpack and javascript. Once these files have been generated, React Static uses them to render and export a list of routes that you provide it into HTML files! After your site has been exported, the resulting data, template, and html files can be transfered to a static file server and browsed as an awesomely fast and performant static website!

But remember, a progressive static site is more than that...

Little did you know that when React Static exported your site, it also generated a tiny, optimized, and code-split version of your original React application for every page of your site! After these pages have loaded, React invisibly mounts this application to the existing HTML on the page and... πŸŽ‰πŸŽ‰πŸŽ‰ You are now using the single page React application you originally built! This application is special, though! While you browse your website, pages that you might go to next are automatically preloaded, making navigation to them instantaneous!.

That's just the beginning! With React Static, you can unleash your creativity and build anything you can imagine with speed and productivity. It even has awesome plugins that will help you on your journey!

Coming from Create React App?

React Static is also a great replacement for the ever popular Create React App CLI. It provides a similar developer experience, zero-config environment, and features, but without boxing you in. If you ever need to customize your build system in React Static, there is no need to eject! You can use existing plugins or write your own to customize anything you'd like about the build system. Not building a static site? No worries there, React Static works as an SPA too, even if there is only a single index.html file.

Articles, Videos & Tutorials

Support, Community & Chat

Need some help? Have a quick question? Click here to sign up for the React-Tools spectrum community! We are constantly answering questions, discussing features and helping each other out!

Contributing, Issues & Bugs

We are always looking for people to help us grow react-static's capabilities and examples. If you have found a bug, or have a feature request let us know!

License

React Static uses the MIT license. For more information on this license, click here.

You can’t perform that action at this time.