/react-ssr-example

Server-side-rendered react example.

Primary LanguageJavaScript

React SSR Example

Server-Side rendered + Client-Side routing (= Universal 🌏) react example :)

Feature

  • HMR(+ Server-Side routes hot reloading) Included ❤️
  • Do SEO (google) and SMO (twitter, facebook...) for React app.
  • No complex routing logic needed anymore! (Will just render page in the /pages)
  • next.js inspired getInitialProps lifecycle.

How to develop

# Install dependencies
npm i

# Start development server with HMR and file watcher
npm run serve

Run production

# Compile sources
npm run build

# Start production server(only hosting static file)
npm run servep

FAQ

How to show bundle size?

Run npm run stats will show stats report via webpack-bundle-analyzer

Which browser supported(polyfilled)?

Run npm run browsers will list supported(will be polyfilled) browsers.

How to run lint?

Run npm run lint will do that based on JavaScript Standard Style

and Run npm run fix will fix lint issues automatically :)