next.js
bd85c9a4 - refactor(turbo-tasks): Add a way to directly construct a ResolvedVc (#69992)

Commit
1 year ago
refactor(turbo-tasks): Add a way to directly construct a ResolvedVc (#69992) Without these APIs, the only way to construct a `ResolvedVc` was: ``` Vc::cell(my_value).to_resolved().await? ``` However, we know when calling `Vc::cell` that the `Vc` must be resolved (since we just assigned it to a cell), so we can shortcut that and provide a better API: ``` ResolvedVc::cell(my_value) ``` For `#[turbo_tasks::value]`s, there's an equivalent `.resolved_cell` method.
Author
bgw bgw
Parents
Loading