Skip to content

Conversation

@pascalbaljet
Copy link
Member

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 :)

@crankeye
Copy link

Hopefully this PR gets merged because it's much more clean to do it this way.

For anyone else who's upgrading from Inertia 1.x to 2.x you can move the resolve function from createInertiaApp() in your app.js to it's own file. Then you can import the function in both the app.js and wherever you need to call router.resolveComponent.

@pascalbaljet pascalbaljet merged commit 8cc2441 into inertiajs:master Jun 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants