$ cnpm install hf-rt
Redux, React-Redux, Redux-thunk, Router Encapsulation.
So we can only use single model file to implement Redux/Redux-thunk
Medium :
hf-rt : A framework to easy use redux, redux-thunk and react-router(partI)
*Support create-react-app
*Write action, action type, reducer in a single file.
*Clear API to implement Web frontend.
npx create-react-app my-app
Delete contents in index.js, and add the contents as below.
import app.js
import { app } from "./app";
app.page({ path: "/home", component: require("./pages/Home") });
app.model(require("./models/products"));
app.api({name:'products', path:''});
app.start("root");
Copyright 2014 - 2017 © taobao.org |