next.js
468de5d1 - Remove workStore from params/searchParams/pathname function signatures (#90215)

Commit
71 days ago
Remove workStore from params/searchParams/pathname function signatures (#90215) `workStore` is a request-scoped value available via `workAsyncStorage.getStore()` anywhere during rendering. Threading it as an explicit parameter was originally done to enforce that these functions are only callable within a valid work scope, but we already throw InvariantErrors when the store is missing in many other places. Reading it from async storage is more idiomatic and removes a parameter that every caller had to forward without ever varying. This is a step toward making metadata components renderable directly without a factory closure that captures workStore.
Author
Parents
Loading