1
const text = 'testing'.padEnd(25) + 'John'

return (
    <li>{text}</li>
)

expected result:

<li>testing                  John</li>

Actual output:

<li>testing John</li>

What is the simplest way to get the expected result?

Related to this: Best practice when adding whitespace in JSX But how should I go about it with padding?

Dez
  • 5,702
  • 8
  • 42
  • 51
Ryan Cameron
  • 371
  • 1
  • 4
  • 14