fn _create_root<'a>(callback: Box<dyn FnOnce() + 'a>) -> ReactiveScope {
    SCOPES.with(|scopes| {
        // Push new empty scope on the stack.
        let scope = ReactiveScope::new();

        if let Some(parent) = scopes.borrow().last() {
            scope.0.borrow_mut().parent = parent.downgrade();
        }
        scopes.borrow_mut().push(scope);
        callback();

        // Pop the scope from the stack and return it.
        scopes.borrow_mut().pop().unwrap_throw()
    })
}
/// Internal implementation: use dynamic dispatch to reduce code bloat.
Internal implementation: use dynamic dispatch to reduce code bloat.
Internal implementation : use dynamic dispatch to reduce code bloat .
fn _create_root<'a>(callback: Box<dyn FnOnce() + 'a>) -> ReactiveScope {
    SCOPES.with(|scopes| {
        // Push new empty scope on the stack.
        let scope = ReactiveScope::new();
        if let Some(parent) = scopes.borrow().last() {
            scope.0.borrow_mut().parent = parent.downgrade();
        }
        scopes.borrow_mut().push(scope);
        callback();
        // Pop the scope from the stack and return it.
        scopes.borrow_mut().pop().unwrap_throw()
    })
}
fn _create_root < ' a > ( callback : Box < dyn FnOnce ( ) + ' a > ) -> ReactiveScope { SCOPES . with ( | scopes | { // Push new empty scope on the stack. let scope = ReactiveScope :: new ( ) ; if let Some ( parent ) = scopes . borrow ( ) . last ( ) { scope . 0 . borrow_mut ( ) . parent = parent . downgrade ( ) ; } scopes . borrow_mut ( ) . push ( scope ) ; callback ( ) ; // Pop the scope from the stack and return it. scopes . borrow_mut ( ) . pop ( ) . unwrap_throw ( ) } ) }
Internal implementation: use dynamic dispatch to reduce code bloat.
Internal implementation : use dynamic dispatch to reduce code bloat .
callback
Box<dyn FnOnce() + 'a>