react-element-to-jsx-string
react-element-to-jsx-string copied to clipboard
Inconsequent string wrapping
Input
const Element = () => (
<div>
<p>
{`{t('Cool')}`}
</p>
<p>
{`t('Cool')`}
</p>
</div>
)
Expected output
const Element = () => (
<div>
<p>
{t('Cool')}
</p>
<p>
t('Cool')
</p>
</div>
)
Actual output
const Element = () => (
<div>
<p>
{`{t('Cool')}`}
</p>
<p>
t('Cool')
</p>
</div>
)
Why is the first p
element getting wrapped in {``}
, bet second not. I expect the first to act as the second (ie. not get wrapped.)