Vue-router: can't import RoteLink from 'vue-router' when i use vue render function with jsx

Created on 12 Jul 2017  路  4Comments  路  Source: vuejs/vue-router

Version

2.7.0

Reproduction link

Steps to reproduce

none

What is expected?

none

What is actually happening?

none


none

Most helpful comment

Try using <RouterLink> (or <router-link> - haven't used JSX before) instead of <Routelink> - you've spelled it wrong.

EDIT: @fnlctrl beat me!

All 4 comments

can you post some code? otherwise this issue will just get closed when someone on the team sees it 馃槃

image

import RouteLink from 'vue-route' ? ? ? ?

how can i import routeLink individually ?

vue-route does not support to import RouteLink individually!

this is vue-router install.js
image

export default {
  render (h) {
    let path = '/test'
    return <Routelink to={path}/>
  }
}

image

Simply use <router-link> inside jsx, as it's a global component registered by vue-router during install. No need for manual imports.

export default {
  render (h) {
    let path = '/test'
    return <router-link to={path}/>
  }
}

Try using <RouterLink> (or <router-link> - haven't used JSX before) instead of <Routelink> - you've spelled it wrong.

EDIT: @fnlctrl beat me!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

achen224 picture achen224  路  3Comments

cnweibo picture cnweibo  路  3Comments

druppy picture druppy  路  3Comments

gil0mendes picture gil0mendes  路  3Comments

yyx990803 picture yyx990803  路  3Comments