Skip to content

Parent doesn't re-render after child watcher mutation #1801

@skirtles-code

Description

@skirtles-code

Version

Latest master. 2787c34

Not reproducible against 3.0.0-rc.5

Reproduction link

https://codesandbox.io/s/morning-smoke-htz9v?file=/index.html

Steps to reproduce

  1. Click the 'Reload' button. Note the text 'Loading' and a load mask.
  2. Wait 2 seconds for loading to complete.
  3. Click one of the radio buttons to change the id.
  4. Note that the word 'Loading' appears but the load mask does not. This is wrong, the load mask should be showing.
  5. Try quickly clicking between the radio buttons. This forces a rendering update and will force the load mask to show.

What is expected?

The load mask should show when a radio button is clicked.

What is actually happening?

Only the 'Loading' message is shown, not the load mask.


It works correctly with flush: 'post'. It doesn't work with flush: 'pre' or flush: 'sync'. This example works with all 3 against rc.5.

To reiterate the key steps here:

  1. The radio button changes the id in the parent.
  2. The parent updates, passing the id as a prop to the child.
  3. The child uses a watcher to respond to the change in id.
  4. The watcher triggers the global loading flag.
  5. The loading flag should cause the parent to update again, but it doesn't.

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