How to fix “&nbsp” not working in JSX and JavaScript?

Spread the love

Sometimes, we want to fix "&nbsp" not working in JSX and JavaScript.

In this article, we’ll look at how to fix "&nbsp" not working in JSX and JavaScript.

How to fix "&nbsp" not working in JSX and JavaScript?

To fix "&nbsp" not working in JSX and JavaScript, we put it in a string.

For instance, we write

<div>This works simply:- {"\u00A0"}-</div>;

to add a space charcter with the "\u00A0" string.

Conclusion

To fix "&nbsp" not working in JSX and JavaScript, we put it in a string.

Leave a Reply

Your email address will not be published. Required fields are marked *