Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend ReactiveScope into scopes that are siblings #280

Merged
merged 8 commits into from Oct 15, 2021
Merged

Conversation

lukechu10
Copy link
Collaborator

This PR adds a new ReactiveScope::extend method which allows running a function in the ReactiveScope after it has already been created. This is especially useful together with wasm_bindgen_futures::spawn_local to extend the scope into inside the async block.

This also adds spawn_local_in_scope which is a simple wrapper around wasm_bindgen_futures::spawn_local but which extends the scope into inside the async block.

Documentation about preloading data has been updated to use this.

Fixes #276

@lukechu10 lukechu10 added C-enhancement Category: new feature or improvement to existing feature A-reactivity Area: reactivity and state handling labels Oct 15, 2021
@lukechu10 lukechu10 added performance Performance related and removed performance Performance related labels Oct 15, 2021
@github-actions
Copy link

github-actions bot commented Oct 15, 2021

The benchmark failed to complete.
Please see the workflow for more details.

Workflow: 1344596692
Adding new commits will generate a new report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-reactivity Area: reactivity and state handling C-enhancement Category: new feature or improvement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with code in "Data fetching and preloading" sub-section of routing section of the documentation
1 participant