Skip to content

hot reload not propagating updated data to children #3225

Closed
@vird

Description

@vird

Vue.js version

1.0.26

Steps to reproduce

vue -V
2.1.0
vue init webpack my-project
# press many times ENTER
cd my-project
npm i
# fill components like this https://gist.github.com/vird/e07fbff0cb56dcec5ec4ce2e2d125661
npm run dev
# open localhost:8080
# click focus text. See that textarea focused properly
# go to shared.js, replace 'focus' to 'focus '
# hotreload applied
# click focus text. shared.js?c91c:8 Uncaught TypeError: Cannot read property 'focus' of null

What is Expected?

textarea focused properly

What is actually happening?

shared.js?c91c:8 Uncaught TypeError: Cannot read property 'focus' of null

What happens

new instance of SharedController, new instance of Hello are created.
Nested has old SharedController that has reference to old Hello instance in textarea_get closure.
Expected Nested has new SharedController instance after hot reload

Sorry for posting here. But https://github.com/vuejs/vue-hot-reload-api/ has no issues tab.

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