-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vue3 and composition api support is here ! #1
Comments
Thank you! Happy to be here. So I imported the files from https://github.com/wobsoriano/mobx-vue-lite. Should we publish a new package? |
No, mobx-vue-lite is ok. mobx-vue support vue2 and mobx-vue-lite support vue3. We don't need publish another new package. Please @ me if you need any help, thanks. ( Hope i am not misunderstanding your meaning |
Okay. All good, thanks! |
Very greate efforts! Thanks for everyone here. Really, I believe the future of state management in frontend is Simple Functional Component + Well Designed Domain Models (and the models, stores, services are driven by libs like import { useState } from "react"
import { observer, useLocalObservable } from "mobx-react-lite"
export default observer(() => {
const state = useLocalObservable(() => ({
count: 0,
get double() {
return this.count * 2
},
increment() {
this.count++
}
}))
//...
}) import { defineComponent } from 'vue'
import { useLocalObservable } from 'mobx-vue-lite'
export default defineComponent({
setup() {
const state = useLocalObservable(() => ({
count: 0,
get double() {
return this.count * 2
},
increment() {
this.count++
}
}))
return { state }
}
}) |
Could this libaray work with vue2.6 and [email protected] ? The SourceCode seems to be very simple, but the import code maybe need be modified ? Update: |
I decided add vue3 support via mobx-vue-lite after consideration. mobx-vue current only support vue2 and mobx( v6 >= 2.1.* , v2|v3|v4|v5 < 2.1.0). @wobsoriano , Robert Soriano Thanks for youre great work for vue3 support, now you are
mobxjs/mobx-vue-lite
project's maintainer , continue your great work please. 🚀The text was updated successfully, but these errors were encountered: