Function dioxus::prelude::spawn_forever

source ·
pub fn spawn_forever(fut: impl Future<Output = ()> + 'static) -> Option<Task>
Expand description

Spawn a future that Dioxus won’t clean up when this component is unmounted

This is good for tasks that need to be run after the component has been dropped.

This will run the task in the root scope. Any calls to global methods inside the future (including context) will be run in the root scope.