In reactjs & nbsp; does not show spaces

render () {

    return (
        <div>
        
        </div>
    );
}

render () {

    let text = "";
    return (
        <div>
        {text}
        </div>
    );
} 
Apr.01,2021

suggest inserting

 tag 


if written in this way, it will be rendered directly as a string.

even if you write

let text = '<span>333</span>';
    return (
        <div>
        {text}
        </div>
    );

will also render 333 together

the right thing to do is to use the dangerouslySetInnerHTML attribute, which officials say avoids cross-site scripting (XSS) attacks

let text = '';
    return (
        <div dangerouslySetInnerHTML={{__html: text }} />
    );
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e51f6e-4516f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e51f6e-4516f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?