2 ms·
But the input is still a string? I think it's helpful to know that when you see JSX like this: <MixinComponent> <InnerComponent name='madeofpalk'/>
by madeofpalk 11y ago
But the input is still a string? I think it's helpful to know that when you see JSX like this:
<MixinComponent>
<InnerComponent name='madeofpalk'/>
</MixinComponent>
JSX will convert that into regular JS which will look like
element('MixinComponent', {},
element('InnerComponent', {name: 'madeofpalk'})
)
Parsing that string during runtime to produce the above data structure isn't ideal.
- clessg 11y agoRight, for sure. Template literals are not a good replacement for JSX.