0.3.0-alpha.1 • Published 6 years ago
redux-arena-router v0.3.0-alpha.1
redux-arena-router-router
High order components of react-router based on redux-arena-router
Install
npm install redux-arena-router --save
Example
A complete example is under /example
directory, including a lot of HOC. And add redux-devtools for state changing show.
Online example can be found here: Here
Quick Start
- Export ArenaScene high order component for ArenaRoute using.
import { bundleToComponent } from "redux-arena/tools";
import state from "./state";
import saga from "./saga";
import * as actions from "./actions";
import PageA from "./PageA";
export default bundleToComponent({
Component: PageA,
state,
saga,
actions
})
- Pass the ArenaScene high order component as ArenaRoute's children.
import React from "react";
import { BrowserRouter, Switch } from "react-router";
import { ArenaRoute } from "redux-arena-router";
import PageA from "./pageA";
export default (props) =>
(<BrowserRouter>
<Switch>
<ArenaRoute>
<PageA />
</ArenaRoute>
</Switch>
</BrowserRouter>);
0.3.0-alpha.1
6 years ago
0.2.0-rc-1
6 years ago
0.2.0-alpha1
7 years ago
0.1.0
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago