Function freya::prelude::flush_sync
pub async fn flush_sync()
Expand description
Wait for the virtualdom to finish its sync work before proceeding
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 flush_sync effects are run immediately before diffing the DOM, which causes all sorts of out-of-sync weirdness.