0.6.0 • Published 6 years ago

@react-mutate/loader v0.6.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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>
);
0.6.0

6 years ago

0.5.0

6 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago