lore-hook-models
Creates a Model for each model in the application
Creates a Model for each model in the application
First install the hook:
npm install lore-hook-models --save
Then add the hook to your index.js
file.
Because this hook generates a reducer, you also need to modify the dependencies array of the redux
hook in order to make sure it runs after this hook, so that the reducer is guaranteed to exist when the Redux store is built.
// index.js
import connections from 'lore-hook-connections';
import models from 'lore-hook-models';
lore.summon({
hooks: {
connections,
models
}
});