New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding meta for routes without a component #33
Comments
This would be nice for applying |
Here we're building our navigation menus from the routes table (using metadata added in route blocks). We used the following hack to work-around this:
if (route.node.value.overrides?.remove)
{
// Move metadata to parent, depends on your use cases
route.parent.addToMeta(route.node.value.overrides.meta);
// Remove from routing table
route.delete();
} If anyone's interested, that approach works. Random remark: |
Thanks for sharing your approach!
Yes, EditableTreeNode is definitely still missing some APIs but also docs and examples 😅 |
Creating folders create routes and any file inside them becomes a nested route. This wasn't possible before v4.1 but now it makes sense to allow defining meta properties (mainly but also any other route property) at this level
This could maybe be achieved with a special file
users/__route.js
that exports some properties like name, meta, etc (the same as in the<route>
block)The text was updated successfully, but these errors were encountered: