You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand why braces are needed for things like numbers, arrays, or even objects - but template literals feel like another kind of string. They'd also make setting CSS class names like the one above a lot more ergonomic.
One issue I can see is that template literals can be preceded by a tag expression, which doesn't look so great:
// this probably shouldn't work<divclassName=tag`Panel${active ? 'active' : ''}` id='test'/>
But perhaps it'd be possible to just support tagless string literals as props?
The text was updated successfully, but these errors were encountered:
One thing that feels a little odd about JSX is that it's possible to pass single quote
'
and double quote"
string literals as props:But it isn't possible to pass template literals in without wrapping them in braces:
I understand why braces are needed for things like numbers, arrays, or even objects - but template literals feel like another kind of string. They'd also make setting CSS class names like the one above a lot more ergonomic.
One issue I can see is that template literals can be preceded by a tag expression, which doesn't look so great:
But perhaps it'd be possible to just support tagless string literals as props?
The text was updated successfully, but these errors were encountered: