Providers?
So for tanstack router all providers are in the context? So no wrapping like in react router or NextJS?
4 Replies
afraid-scarlet•6mo ago
no. while you can put things into router context you can also wrap in providers
metropolitan-bronzeOP•6mo ago
which is better? Id prefer to do things the tanstack way
other-emerald•6mo ago
It dependent how you want to update it.
With React context you can update it anywhere in the app and consumers will rerender. In order to change router context a navigation or a router invalidation needs to happen
sensitive-blue•6mo ago
Also, depends on need, at least as far as I know, you cannot read a react context inside of loaders.