Skip to content

joehua87/redux-universal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published