Skip to content

Latest commit

 

History

History
76 lines (62 loc) · 2.9 KB

README.md

File metadata and controls

76 lines (62 loc) · 2.9 KB

The code is in experience mode & the docs need to be improved. If you see any problem with it, please correct me. Thank you.

Demo

http://45.79.94.169:3000 (still run on NODE_ENV=dev, so the performance would be slow)

Increase Dev Experience when coding on Client Side Render (not server)

Why?

  • Currently we rely on webpack-isomorphic-tools & webpack-isomorphic-tools will run every time we change code (it's take a lots of time - and sometime you need to restart the process to see the changes)
  • If you find any better solution, please notify me. Thank you

My Solution

  • Write tests for server rendering to make sure content will be rendered into html before sending to browser, see
tests/server-render.tests.js
  • We define webpack into 2 config files. 1 for client (dev.config) & 1 for universal (dev.universal.config (see in webpack) & production.universal.config - not implemented yet).
  • When coding, we start the client side render process to take all advantages on client render (speed & reloading)

Get Started

  • npm run dev-api
  • Start a new terminal and run: npm run dev (If you want to try server rendering, run: npm run dev-universal)

Features

Real world examples

  • An Blog site with server rendering for SEO Advantage (content will be rendered into Html before sending to client)

Tech

Commands

  • See latest at package.json

Issues

  • Nested Route (waiting for markdalgleish/redial#16)
  • Exit on test render on server (maybe find way to force stop webpack-isomorphic-tools)

TODO

  • Authentication middleware
  • Post Administration
  • Add More Testing: (http://redux.js.org/docs/recipes/WritingTests.html)
  • reselect
  • Try redux-saga
  • FlowType
  • Refactor webpack
  • SEO meta with react-helmet
  • Test Render on Server (for Blog Example) to make sure html is rendered on server
    • route to home
    • route to category page
    • route to tag page
    • route to post page
  • Config Continuous Delivery
  • Add Code Coverage with istanbul

Reference

Starter Kits

Libraries

Examples & Tutorials