Use the Link component from an external dependancy #1945
Unanswered
efroim102
asked this question in
Help (Vue)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have custom styled Link component that is a wrapper around the Inertia Link component, it's reused across the project, and I wanted to use it on other projects as well.
I tried extracting it to an external package, but when used, it's being rendered as expected, but the click event results in an
this.resolveComponent is not a function
console error.From what I can gather, the response from the XHR request (triggered by the link click) is being handled by the external package, which isn't aware of any of the core project's Inertia Pages, thus being unable to resolve the Page it's meant to visit and render.
The package itself does not register a Vue or Inertia app.
Is there any way of making the Link component work when it's coming from an external package/project? somehow have it registered with the core apps router so that it can resolve pages correctly?
Beta Was this translation helpful? Give feedback.
All reactions