symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony
https://ux.symfony.com/
MIT License
849 stars 312 forks source link

[Live] Unfriendly JS error if you forget to expose a LiveProp then use it #535

Open weaverryan opened 2 years ago

weaverryan commented 2 years ago

Relates somewhat to #425, where this system may be changed.

Pretty simple:

class MyComponent
{
    #[LiveProp()]
    public Invoice $invoice;
}

Then in the template:

<input data-model="invoice.customerName">

This results in an ugly JS error:

Cannot read properties of null (reading 'customerName')

carsonbot commented 6 months ago

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot commented 6 months ago

Friendly ping? Should this still be open? I will close if I don't hear anything.

carsonbot commented 5 months ago

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!