pub async fn wait_for_next_render()
Expand description

Wait for the next render to complete

This is useful if you’ve just triggered an update and want to wait for it to finish before proceeding with valid DOM nodes.

Effects rely on this to ensure that they only run effects after the DOM has been updated. Without wait_for_next_render effects are run immediately before diffing the DOM, which causes all sorts of out-of-sync weirdness.