Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including hf-rt with all npm packages installed. Try it out:

require("lodash/package.json"); // lodash is a peer dependency. require("react/package.json"); // react is a peer dependency. require("react-dom/package.json"); // react-dom is a peer dependency. require("react-redux/package.json"); // react-redux is a peer dependency. require("react-router/package.json"); // react-router is a peer dependency. require("react-router-dom/package.json"); // react-router-dom is a peer dependency. require("redux-devtools-extension/package.json"); // redux-devtools-extension is a peer dependency. require("redux-thunk/package.json"); // redux-thunk is a peer dependency. var hfRt = require("hf-rt")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

hf-rt v1.0.51

Description

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)

Feature

*Support create-react-app
*Write action, action type, reducer in a single file.
*Clear API to implement Web frontend.

How to use

  • Create a creat-react-app project
npx create-react-app my-app
  • Delete contents in index.js, and add the contents as below.

  • import app.js

import { app } from "./app";
  • Then, you can start to add your new page.
app.page({ path: "/home", component: require("./pages/Home") });
  • Or, add a new model
app.model(require("./models/products"));
  • Or, add a new api
app.api({name:'products', path:''});
  • After that, strat your app
app.start("root");
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free