I've been working on a project using https://inertiajs.com/ and https://vuejs.org/. One of the things I was doing was to share a property from Laravel to Vue.

return Inertia::render('Users', [ 'MyProperty' => 'MyPropertyValue' ]); In order to work with this property, I defined an interface on Typescript and called the defineProps method on my Vue component export interface User { MyProperty: string; } import {User} from '/my/path/to/user'; This property totally works fine. It gets super annoying when you try to pass this property down to a underlying component.

It makes you doubt your sanity a little bit, which is why I decided to write this post.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners