Skip to content

How to use MobX without React? #3396

Answered by kubk
martin-braun asked this question in Q&A
May 15, 2022 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Laravel has built-in integration with React / Vue that's why I'd choose them: https://laravel.com/docs/7.x/frontend
Mobx has integrations with both React and Vue.

Here is an example how to use autorun to manually update DOM when observable data changes: https://jsfiddle.net/Lrt9pky4/
But if you want something automatic you should implement your own observer. Essentially it is autorun(() => component.rerender()) but you probably end up building a library to cover all the edge cases. It is up to you to decide if it's worth it.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@martin-braun
Comment options

Comment options

You must be logged in to vote
2 replies
@martin-braun
Comment options

@martin-braun
Comment options

Answer selected by martin-braun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants