Skip to content
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

mobx cause [Vue warn]: Unknown custom element: <router-link> #31

Open
dohoangn opened this issue Jul 22, 2019 · 0 comments
Open

mobx cause [Vue warn]: Unknown custom element: <router-link> #31

dohoangn opened this issue Jul 22, 2019 · 0 comments

Comments

@dohoangn
Copy link

dohoangn commented Jul 22, 2019

It was working fine before installing and add mobx to vuejs
main.js

import Vue from 'vue/dist/vue.js'
import VueRouter from 'vue-router'

import App from './components/app/App'
import router from './routers'

Vue.use(VueRouter)
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

App Template:

<div id="app">
  <router-link to="/home">Home</router-link> 
  <router-view></router-view>
</div>

App Script:


import { observer } from 'mobx-vue';
import Store from '../../stores/store';

export default observer({
  name: 'app',
  components: {},
  data() {
    return { state: new Store() };
  }
});

I've got this error:

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant