Skip to content

keep-alive causes functional route component not rendered #664

@Centaur

Description

@Centaur

Vue.js & vue-router.js version

2.0.0-rc.6 & 2.0.0-rc.5

Reproduction Link

https://jsfiddle.net/oldpig/qos7px6j/6/

Steps to reproduce

run

What is Expected?

content of functional component Page1 should be rendered

What is actually happening?

Not rendered.

Observations:
If keep 'keep-alive' and remove functional : true, works as expected.
If remove keep-alive and keep functional: true, it gets rendered but class 'view' defined in router-view is not merged. I guess this can be reasoned from technical point of view, but it can still be very surprising at the first sight. So I think it may at least deserve a special treatment in the documentation.
If remove both, works as expected.

All these observations apply to jsx as well.

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