woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.01k stars 38 forks source link

How do you use the props from dead view CSR in the svelte file? #79

Closed user20230119 closed 10 months ago

user20230119 commented 10 months ago

This doesn't work.

<.svelte name="MyComponent" props={%{my_number: 1}} ssr={false} />

<script>
    export let my_number
</script>

{my_number}
woutdp commented 10 months ago

Hmm that's weird, are you doing something similar to this?

I'd need some more information to see why it's not working

user20230119 commented 10 months ago

Sorry, I was setting the the props in the wrong file. It's working now.