Skip to content

router-view/ router-link cannot work #629

@eric000

Description

@eric000

Version

4.0.0-rc.6

Reproduction link

http://none

Steps to reproduce

start run script

What is expected?

router-view/ router-link normal

What is actually happening?

const RouterView = RouterViewImpl;
// warn against deprecated usage with &
// due to functional component being no longer eager in Vue 3
function warnDeprecatedUsage() {
const instance = vue.getCurrentInstance();
const parentName = instance.parent && instance.parent.type.name;
.....

TypeError: Cannot read property 'parent' of null


const RouterLinkImpl =
.....
setup(props, { slots, attrs }) {
const link = vue.reactive(useLink(props));
const { options } = vue.inject(routerKey);

Cannot destructure property 'options' of 'vue.inject(...)' as it is undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions