We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is my code
<template> <div class="test"> <p>{{testMobx.data}}</p> </div> </template> <script lang="ts"> import Vue from 'vue' import Component from 'vue-class-component' import { Observer } from 'mobx-vue' import { observable } from 'mobx' class TestMobx { @observable data = 123 } let TestClass = new TestMobx() @Observer @Component export default class App extends Vue { testMobx = TestClass } </script>
but has this warning:
[Vue warn]: The "data" option should be a function that returns a per-instance value in component definitions.
why??
The text was updated successfully, but these errors were encountered:
I'm trying to do this
data () { return { testMobx: TestClass } }
but warning still exists
Sorry, something went wrong.
Could you please provide a minimum reproduction with codesandbox? You can make it with this template https://codesandbox.io/s/j76vj84zw9
This is a simple demo https://codesandbox.io/s/lj3l95m09 If I use vue-router, this warning will appear, If I not use vue-router, there's no problem,
@lvvlan fixed and released v2.0.7 Thanks for your feedback!
No branches or pull requests
This is my code
but has this warning:
[Vue warn]: The "data" option should be a function that returns a per-instance value in component definitions.
why??
The text was updated successfully, but these errors were encountered: