Skip to content

noahismith/react-ssr-ssg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React SSR/SSG Example

A simplified example of static site generation (SSG) with conditional server side rendering (SSR) using React, Webpack, and Express.

Getting Started

Installation

Download this repo and install dependencies. You will also need Node on your machine.

git clone https://github.com/noahismith/react-ssr-ssg.git
cd react-ssr-ssg
npm install

To test SSR start the server without generating the html then open http://localhost:3000 in your browser.

npm run start

To test conditional SSR generate the html and start the server. Remeber to clear the dist/ folder to test SSR only.

npm run generate
npm run start

Resources

renderToPipeableStream
hydrateRoot

About

A barebones example of SSG and SSR using React, and Webpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors