Skip to content

beforeUpdate() is actually executed AFTER render() #7481

Closed
@nobelhuang

Description

@nobelhuang

Version

2.5.13

Reproduction link

https://jsfiddle.net/5vze74yy/

Steps to reproduce

  1. Add render() and beforeUpdate() hook to the instance.
  2. Trigger data value change by any means

What is expected?

Per the API

https://vuejs.org/v2/api/index.html#beforeUpdate

beforeUpdate is supposed to be fired before render(), and state changes in this hook should not trigger additional re-renders.

What is actually happening?

beforeUpdate() is actually invoked after render() in current version 2.5.13.


This could result in infinite update loop, as state changes in beforeUpdate() will trigger another re-rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions