MCPcopy Create free account
hub / github.com/DioxusLabs/dioxus / queue_effect

Function queue_effect

packages/core/src/global_context.rs:142–144  ·  view source on GitHub ↗

Queue an effect to run after the next render. You generally shouldn't need to interact with this function directly. [use_effect](https://docs.rs/dioxus-hooks/latest/dioxus_hooks/fn.use_effect.html) will call this function for you.

(f: impl FnOnce() + 'static)

Source from the content-addressed store, hash-verified

140
141/// Queue an effect to run after the next render. You generally shouldn't need to interact with this function directly. [use_effect](https://docs.rs/dioxus-hooks/latest/dioxus_hooks/fn.use_effect.html) will call this function for you.
142pub fn queue_effect(f: impl FnOnce() + 'static) {
143 Runtime::with_current_scope(|cx| cx.queue_effect(f))
144}
145
146/// Spawn a future that Dioxus won't clean up when this component is unmounted
147///

Callers 15

create_metaMethod · 0.85
create_scriptMethod · 0.85
create_styleMethod · 0.85
create_linkMethod · 0.85
add_body_elementFunction · 0.85
match_hydrationFunction · 0.85
set_titleMethod · 0.85
create_metaMethod · 0.85
create_scriptMethod · 0.85
create_styleMethod · 0.85
create_linkMethod · 0.85
set_titleMethod · 0.85

Calls 1

queue_effectMethod · 0.45

Tested by

no test coverage detected