Easy-peasy: update configure store example in readme

Created on 2 Feb 2019  路  7Comments  路  Source: ctrlplusb/easy-peasy

The code snippet for configuring the store in the README is incorrect. Maybe consider replacing it with the following:

import { composeWithDevTools } from 'redux-devtools-extension';
import { createStore } from 'easy-peasy';
import { model } from './models';

/**
 * model, is used for passing through the base model
 * the second argument takes an object for additional configuration
 */

const store = createStore(model, {
  compose: composeWithDevTools({ realtime: true, trace: true })
  // initialState: {}
});

export default store;

All 7 comments

the readme states that you need to pass in:

const store = createStore(model, {
  config: {
    compose: composeWithDevTools({ realtime: true }),
  }
);

But the api is not expecting { config: { }} as the second argument. The argument itself is implicitly the configuration

Excellent spot, thanks! Would you consider raising a PR? 馃槆

sure thing

I've branched off master and am trying to publish the branch to open a PR but I'm getting access denied 馃槙

Invalid permissions

Ah yeah, that won't work. You need to fork and then put a PR through, in the context of GitHub. You sound like you know your way around Git already, so pick out the videos from this series to help:

https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github

Shout if you have any issues, I would love to get you started on contributing. 馃憤

Thank you so much for your contribution!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ctrlplusb picture ctrlplusb  路  5Comments

lishine picture lishine  路  6Comments

Windynik picture Windynik  路  5Comments

ifyoumakeit picture ifyoumakeit  路  5Comments

raul-madrigal picture raul-madrigal  路  3Comments