AriaFallah / mobx-store

A data store with declarative querying, observable state, and easy undo/redo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

schedule doesn't fire

mochacoder opened this issue · comments

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.

@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: mobxjs/mobx#248 (comment). Basically it's not uncommon that in certain cases an autorun will never fire.

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.

@mochacoder

No worries. Feel free to continue asking questions.