react-router V4 & DvaJS : by @solodynamo

What is react-router?

  1. Router for React which keeps your UI in sync with the URL.

Features

  1. Lazy code loading
  2. Dynamic route matching
  1. Dynamic route matching

Version 3 vs Version 4

  1. v4 is almost complete rewrite of react-router
  2. Reason: Declarative Components
  3. Declarative:Answers What You Wanna Do ?
  4. So we write our router code as if they were just normal React components.Lets see...
  1. We treat each component just as another react UI component.
  2. "exact" attribute in the first is to prevent Home component to render together with About or Contact component again.
  3. We can further break it down ...PTO

Major Changes In Version 4

  1. Splitting in Packages
  2. New BrowserRouter component.
  3. Route more declarative with 'exact'.
Questions
DvaJS
  1. Dva is a lightweight based on react, redux which aims to make building React/Redux applications easier and better.
Why Use It?
  1. Less Messy Code.
  2. Works with react-native too.
  3. Very Small API.