mobxjs / mobx-vue

🐉 Vue bindings for MobX
MIT License
475 stars 22 forks source link

What about Provider decorator? #21

Closed pgalwa closed 6 years ago

pgalwa commented 6 years ago

Hey, Is any common pattern for mobx-vue which is similar to using Provider decorator from a mobx-react?

Also I have a question about using it with routing. Can I inject specified substore/ substores to exact route?

kuitos commented 6 years ago

@pgalwa As the context concept did not occur in vue system, so the Provider approach does not have a really usage in vue app imo. But if you are really want the Provider mechanism, you could try the native provide/inject which provided by vue.

Also I have a question about using it with routing. Can I inject specified substore/ substores to exact route?

Could you please show some code to describe this use case?

pgalwa commented 6 years ago

Could you please show some code to describe this use case?

I meant something like in https://github.com/alisd23/mobx-react-router but I see you answered my question :)

So thanks 👍

kuitos commented 6 years ago

Cool😀 Thanks for your feedback!