symfony / ux

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

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

Open weaverryan opened 1 year ago

weaverryan commented 1 year 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 4 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 4 months ago

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

carsonbot commented 3 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!