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

Svelte equivalent of React's props.children?

$
0
0

I haven't found this feature anywhere in svelte 3..I want it to be something like this..

App.svelte

<Error><p>Can't connect to the server!</p></Error>`

Error.svelte

<div>{props.children}</div>

I want App.svelte to show:

<div><p>Can't connect to the server!</p></div>

I only know how to do this with React's props.children.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



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