Hello how can I divide it into 2 different lines? Then it's called inside of div in different class.
this.setState({errorMessage:"First Line. Second Line"});
Hello how can I divide it into 2 different lines? Then it's called inside of div in different class.
this.setState({errorMessage:"First Line. Second Line"});
Use a <div>
or <p>
tag with <br />
tag. You can use any of the following:
this.setState({ errorMessage: <div>First Line.<br />Second Line</div> });
this.setState({ errorMessage: <p>First Line.<br />Second Line</p> });
A quick tip will be, don't use dangerouslySetInnerHTML
, which might get you into more troubles.