@react-mutate/loader
Easily add user-defined extensions into your react application
Last updated 2 years ago by flaque .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @react-mutate/loader 
SYNC missed versions from official npm registry.

Mutations Loader

The loader in @react-mutate/loader is a series of tools to help load in mutations as npm-modules.

You give the loader a path where you want to store user mutations and it will create a mini-node project like this:

MyEnclosingFolder
    - mutations
        - package.json
        - node_modules

installMutations

You can use installMutations to add some extensions to your app. If you don't have a mutations folder, it will create one for you.

Examples

import { installMutations } from "@react-mutate/loader";

installMutations(["some-npm-module-name", "another-one", "another-other-one"], "path/to/save/folder");

loadMutations

You can use loadMutations to pull from your save folder and get a list of mutations that you can pass into <MutationsProvider />.

Examples

import { loadMutations } from "@react-mutate/loader";

const mutations = await loadMutations("path/to/save/folder");
const toRender = (
  <MutationsProvider mutations={mutations}>
    <App />
  </MutationsProvider>
);

Current Tags

  • 0.6.0                                ...           latest (2 years ago)

9 Versions

  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.4                                ...           3 years ago
  • 0.4.3                                ...           3 years ago
  • 0.4.2                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.4                                ...           3 years ago
  • 0.3.3                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (5)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |