what's the point of Dynamic?

reading through the tutorial,
<Dynamic component={options[selected()]} />
<Dynamic component={options[selected()]} />
seems to do the same thing as
{options[selected()]}
{options[selected()]}
2 Replies
Madaxen86
Madaxen862w ago
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.
Alex Lohr
Alex Lohr2w ago
Dynamic handles props.

Did you find this page helpful?