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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners