T
TanStack2y ago
optimistic-gold

Dynamic breadcrumbs, fetched from API

I am struggling on how-to implement dynamic breadcrumbs, which we did with React router, where for instancewe go to Edit product page we would like to display the product name which we only know when we have retrieved the data. I have implemented breadcrumbs using context and setting breadcrumbs from loader, but how can (if possible?) I achieve this from fetched data? Any tips is greatly appreciated.
1 Reply
fascinating-indigo
fascinating-indigo2y ago
Thinking out loud but if you fetch the product info in the loader then can’t you set the context based on the response of the fetch?

Did you find this page helpful?