#what's the point of Dynamic?

2 messages · Page 1 of 1 (latest)

hot nest
#

reading through the tutorial,

<Dynamic component={options[selected()]} />

seems to do the same thing as

{options[selected()]}
reef badger
#

It’s very helpful for component libraries.
E.g. you have a Card component and you can let the user decide to render a div or main or section or button, a, … or even a custom component.