Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Destructure and don't destructure variable at the same time in svelte

$
0
0

I was wondering if it's possible to have access to entire object inside if/for, but still be able to destructure individual props

{#if object_var}  {const {prop_var} = object_var}. <- doesn't work, "unexpected token"  display: {prop_var}{/if}

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>