T
TanStack11mo ago
correct-apricot

Adding additional info to a route configuration

General question, is it possible to attach additional data to a route config, and have it typed for all routes? Thinking of something like being able to define an icon component for a route, so that I can pull that when displaying links in a sidebar or page title. The alternative is having to define things like a route's icon somewhere else in my application, which means that my route configuration is in different parts of my code instead of being centralized. If it helps, I'm using file based routing.
2 Replies
conscious-sapphire
conscious-sapphire11mo ago
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.
From An unknown user
From An unknown user
correct-apricot
correct-apricotOP11mo ago
Ha, perfect, thank you!

Did you find this page helpful?