jsx not working

前端 未结 6 1873
無奈伤痛
無奈伤痛 2020-12-13 03:02

I am using the   tag in jsx and it is not rendering the space. The following is a small snippet of my code.Please help.

var Reporting=React.createCla         


        
6条回答
  •  粉色の甜心
    2020-12-13 03:40

    If this doesn't work for you {' '} then use {'\u00A0'}.

    {' '} will render a space but there are some cases when you want the line height to also be rendered in a case there you want a space inside an HTML element that has no other text ie: {' '}, in that case you'll need to use {'\u00A0'} inside the span or HTML element.

提交回复
热议问题