XSS and CSRF as sooo different things that I believe you should not mix them in single question.
XSS is about displaying user input without any sanitizing on your side/in your html. And that user input may contain javascript that steals cookie or sends private message etc on current user behalf. Obviously to prevent that you need to sanitize or escape everything comes from user. But React does that for you until you are so risky that use dangerouslySetInnerHTML
As for CSRF it's up to backend in first place to handle it somehow(see another SO question for details). React here just may handle token to make secured request work. But it depends on backend implmenention.