Best practice when adding whitespace in JSX

前端 未结 9 814
粉色の甜心
粉色の甜心 2020-12-02 11:35

I understand how (and why) to add a whitespace in JSX, but I am wondering what\'s best practice or if any makes any real difference?

Wrap both elements in a

9条回答
  •  盖世英雄少女心
    2020-12-02 12:32

    You don't need to insert   or wrap your extra-space with . Just use HTML entity code for space -

    Insert regular space as HTML-entity

    Full name: {this.props.fullName}

提交回复
热议问题