T
TanStack13mo ago
continuing-cyan

Trying to set up global context and running into errors

I'm sure my inability to figure this out is due to being very new at this but I just can't figure out what exactly I am missing here. I get errors you can see at the following Gist... https://gist.github.com/Dave-Wagner/ab444330743318b1d44e41f161d4fe78 If anyone can take a look and just point me in the right direction I'd highly appreciate it.
3 Replies
sensitive-blue
sensitive-blue13mo ago
use createRootRoute or createRootRouteWithContext
const rootRoute = createRootRouteWithContext<GlobalContext>()({
component: () => (
<div>
Root Layout
<Outlet />
</div>
)
})
const rootRoute = createRootRouteWithContext<GlobalContext>()({
component: () => (
<div>
Root Layout
<Outlet />
</div>
)
})
sensitive-blue
sensitive-blue13mo ago
No description
continuing-cyan
continuing-cyanOP13mo ago
Thank you so much, I knew I was missing something obvious but you helped me figure it out, once again, thanks.

Did you find this page helpful?