A progressive static-site generator for React.
Read the introduction article on Medium
React-Static is a fast, lightweight, and powerful framework for building static-progressive React applications and websites. It's been carefully designed to meet the highest standards of SEO, site performance, and user/developer experience.
- βοΈ 100% React (or Preact!)
- π Blazing fast builds and performance.
- π Data Agnostic. Supply your site with data from anywhere, however you want.
- βοΈ Automatic code and data splitting for routes!
- π₯ Instant page views via PRPL pattern.
- π― Built for SEO.
- π₯ React-first 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 in real-time.
- π² LAN accessible dev environment for testing on other devices like phones and tablets.
- Get started in 5 minutes! (create-react-app template) (5 min)
- Introducing React-Static! How it works and why we built it! (80 min)
- Walkthrough - Installing and creating a new project with Styled Components (20 min)
- Nozzle.io
- Timber.io
- Manta.life
- Manticore Games
- BlackSandSolutions.co
- David York - Personal Blog
- Cryptagon - Crypto Portfolio Tracker
- Install the CLI:
$ yarn global add react-static
# or
$ npm install -g react-static
- Create a new project:
$ react-static create
- Pick a template! See the full list of templates
- Navigate to your new project:
$ cd my-static-site
- Start the dev server and edit some code!
$ yarn start # or react-static start
- Test a production build
$ yarn stage # or react-static build --staging
$ yarn serve
- Build for production!
$ yarn build # or react-static build
Once you've installed and test driven sufficiently, you may want to:
- Read about the core concepts of React Static
- Familiarize yourself with the API and all that is possible!
- Join the slack organization!
All of the following examples can be used as a template at project creation.
- Basic
- Blank (Create-React-App)
- Preact
- Animated Routes
- Custom Routing
- Dynamic Imports (code-splitting)
- Firebase Auth
- Glamorous & Tailwind CSS
- Glamorous
- LESS & Antdesign
- Styled-Components
- Redux
- Apollo GraphQL
- Apollo & Redux
- TypeScript
- Cordova (Hybrid App)
- Basic Prismic (Headless CMS)
- GraphCMS
- Sass
- Tailwind CSS
- Algolia
Can't find an example? We invite you to write one! Simply copy the basic
or blank
templates and make the necessary changes. Then submit a PR including your new example directory and a new item in the list above. When merged, your example will automatically become a template in the CLI. How magical!
Need some help? Have a quick question? Click here to sign up for the React-Tools slack org, and join us in the #react-static channel! We are constantly answering questions, discussing features and helping each other out!
We are always looking for people to help us grow react-static
's capabilities and examples. If you have an issue, feature request, or pull request, let us know!
React Static uses the MIT license. For more information on this license, click here.