Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mrkarma4ya's avatar

Import Link component globally in Inertia.js

Is there any way to import the Link component globally instead of importing it manually in every component its being used in?

VSCode doesn't automatically import this component for me either.

0 likes
3 replies
bugsysha's avatar
bugsysha
Best Answer
Level 61

On createApp() call component().

createApp({render: () => h(App, props)})
  .component("Link", Link)
bugsysha's avatar

VSCode doesn't automatically import this component for me either.

VSCode is crap.

1 like

Please or to participate in this conversation.