FormidableLabs / freactal

Clean and robust state management for React and React-like libs.
MIT License
1.65k stars 46 forks source link

had to modify code in guide to get it to work #66

Closed Jascha-Sundaresan closed 7 years ago

Jascha-Sundaresan commented 7 years ago

this

const wrapWithPending = (pendingKey, cb) => effects  =>
  effects.setFlag(pendingKey, true)
    .then(cb)
    .then(value => effects.setFlag(pendingKey, false).then(() => value));

needs to be

const wrapWithPending = (pendingKey, cb) => effects  =>
  effects.setFlag(pendingKey, true)
    .then(() => cb)
    .then(value => effects.setFlag(pendingKey, false).then(() => value));
divmain commented 7 years ago

As discussed on twitter, this was a misunderstanding. Please reach out if you run into more issues!