Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
skirtles-code opened this issue Aug 6, 2020 · 0 comments
Closed

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

skirtles-code opened this issue Aug 6, 2020 · 0 comments

Comments

@skirtles-code
Copy link
Contributor

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.
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant