Best practice when adding whitespace in JSX
问题 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 span <div className="top-element-formatting"> <span>Hello </span> <span className="second-word-formatting">World!</span> </div> Add them on one line <div className="top-element-formatting"> Hello <span className="second-word-formatting">World!</span> </div> Add space with JS <div className="top-element-formatting"> Hello {" "} <span