framework
framework copied to clipboard
feat: allow `getRouteFromPath` to use objects
🔗 Linked issue
#5518
❓ Type of change
- [ ] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [x] 👌 Enhancement (improving an existing functionality like performance)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
Allows the getRouteFromPath function to accept objects. I convert the object to a URL first by using the stringifyParsedURL in ufo and the code proceeds as normal. The playground has an example of a single-page app using an object to set the path, query, and hash. The issue is described in #5518.
This is my first time playing around with something like this, so I know there will probably be many things that need to be changed or this being closed entirely.
Resolves #5518
📝 Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Deploy Preview for nuxt3-docs canceled.
| Name | Link |
|---|---|
| Latest commit | f524611166271f70725699b62a2d08f4af066d0c |
| Latest deploy log | https://app.netlify.com/sites/nuxt3-docs/deploys/6303a80b349ad4000b6b7189 |