AriaFallah / mobx-store

A data store with declarative querying, observable state, and easy undo/redo.
MIT License
282 stars 9 forks source link

schedule doesn't fire #36

Closed mochacoder closed 8 years ago

mochacoder commented 8 years ago

I can't get schedule to fire in a basic use of the store. When searching the repository I see it created in index.js at line 78 and set on the db at line 27 but no other references to it in the repository. I'm thinking it's just not wired up to anything.

AriaFallah commented 8 years ago

@mochacoder

Could you post the code you're trying to schedule? There are some quirks with when your tasks run so it'd be helpful to have the code.

The scheduling is based on autorun, which I go into a bit of depth about here: https://github.com/mobxjs/mobx/issues/248#issuecomment-218927070. Basically it's not uncommon that in certain cases an autorun will never fire.

mochacoder commented 8 years ago

Yeah whenever I run one of the examples from the site it does work so must be something specific in my code. I'll figure it out, thanks for the quick comment and that autorun link does help.

AriaFallah commented 8 years ago

@mochacoder

No worries. Feel free to continue asking questions.