question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate inertia-link using b-link

See original GitHub issue

Is your feature request related to a problem? Please describe…

Currently it is not possible to generate an inertia-link using the b-link (and all related) components.

Describe the solution you’d like

The ability to generate links based on any route components, not just the ones based on vue-router

Describe alternatives you’ve considered

The only solution now is to generate links via inertia-link component and manually apply all necessary bootstrap classes.

Additional context

I’m just trying to make InertiaJS and BoostrapVue work together 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
makroxyzcommented, Jan 2, 2021

Just bumped into this as well. The solution seems very simple though. Not sure if it has other implications, however in the 30 seconds I tested this with a pretty complex UI, it seems that inertia does intercept all links.

RouterLink.vue

<template>
  <inertia-link :href="to">
    <slot />
  </inertia-link>
</template>

<script>
  export default {
    props: ['to']
  }
</script>

app.js

import RouterLink from './RouterLink'
Vue.component('RouterLink', RouterLink)
Vue.prototype.$router = 'fake'

this works fine but when used on b-pagination-nav it can’t set the active page… 'cos of missing router Is there any workaround??

3reactions
lazabogdancommented, Oct 16, 2020

Just bumped into this as well. The solution seems very simple though. Not sure if it has other implications, however in the 30 seconds I tested this with a pretty complex UI, it seems that inertia does intercept all links.

RouterLink.vue

<template>
  <inertia-link :href="to">
    <slot />
  </inertia-link>
</template>

<script>
  export default {
    props: ['to']
  }
</script>

app.js

import RouterLink from './RouterLink'
Vue.component('RouterLink', RouterLink)
Vue.prototype.$router = 'fake'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Links - Inertia.js
To create an Inertia link, use the Inertia <Link> component. Note, any attributes you provide will be proxied to the underlying tag. Vue...
Read more >
Introducing Inertia.js - Jonathan Reinink
My goal with this approach is to allow developers to build rich client-side apps without all the complexity of building a full-on single-page ......
Read more >
The Ultimate Guide to Inertia.js - Kinsta
A look at how Inertia.js makes constructing single-page applications a piece of cake, while solving other problems for developers.
Read more >
Reddit Clone Full Tutorial with Laravel, Inertia JS and VueJS
In this video, we are going to see the project overview.Fullstack Reddit CloneLaravel Reddit clone.Laravel tutorial.
Read more >
Laravel Inertia JS Portfolio Project Full tutorial - YouTube
This video will show you how to build a full portfolio project with Laravel 9 and InertiaJS.Learn how to build a Portfolio project...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found