inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.56k stars 435 forks source link

[2.x] Restore `router.resolveComponent()` method #2039

Open pascalbaljet opened 1 month ago

pascalbaljet commented 1 month ago

First of all, thanks for all the great work on v2! ❤️

In v1, the resolveComponent method was available on the router instance. This PR restores that for v2.

I am using this in my modal package to resolve the modal component, similarly to resolving a page. Without having this method publicly available, I must duplicate/reference the resolveComponent method in the main app.js file. That would be a shame, as it's so clean and nice in v1 :)