kitbagjs / router

A type safe router for vuejs
https://router.kitbag.dev
MIT License
173 stars 4 forks source link

merge parent route meta with children route meta #242

Closed stackoverfloweth closed 1 month ago

stackoverfloweth commented 1 month ago

This PR updates createRoute utility to use a new combineMeta to merge child meta with parent (if parent exists). This follows the pattern used for state (and others). Merging meta is just a bit unique in that duplicate keys are allowed as long as the child's property of the same name matches typeof for the parent. The thinking here being that the child can override the meta property of a parent.

This PR also adds a new test suite for createRoute, with tests for new meta functionality as well as combine logic for other parts of the route.

netlify[bot] commented 1 month ago

Deploy Preview for kitbag-router ready!

Name Link
Latest commit c1cf6e9610a98234a7771603a04b1ee7c72a6296
Latest deploy log https://app.netlify.com/sites/kitbag-router/deploys/66bfae0354ece0000836c741
Deploy Preview https://deploy-preview-242--kitbag-router.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.