redux-arena-router
TypeScript icon, indicating that this package has built-in type declarations

0.3.0-alpha.1 • Public • Published

redux-arena-router-router

Build Status Coverage Status npm version PRs Welcome

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

  1. 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
})
  1. 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>);

Package Sidebar

Install

npm i redux-arena-router

Weekly Downloads

6

Version

0.3.0-alpha.1

License

Apache-2.0

Last publish

Collaborators

  • hapood