nyura123/mobx-firebase-store

Complete example of mobx-firebase-store with React component

Closed this issue · 2 comments

This is awesome. I was about to have to roll a Firebase+MobX (+React) thing myself; glad you beat me to it because this is definitely better than what I would have come up with!

It seems like to use this with React I just have to use the @autoSubscriber decorator and then have subscribeSubs call myMobxFirebaseStore.subscribeSubs. Is that right?

Would be valuable to see a complete example of mobx-firebase-store with a React component.

Also, for the getSubs method that @autosubscriber needs, it would be nice to be able to use a Mobx @computed.

Hi @liron00, thanks! I'm working on an example.

The autoSubscriber/getSubs comes from another lib (firebase-nest), which doesn't have any mobx dependencies, so can be used with mobx, redux, etc. It does have a small mobx example with its own custom store: https://github.com/nyura123/firebase-nest/blob/master/examples/MobxComponentExample.js