If it becomes a problem, you could drop in a react-compatible library pretty quickly. React native might be tougher but still would probably appear if there was a case with a lot of publicity.
Other frameworks could infringe the hypothetical React-related patent. There is no safety from infringement as long as software patents exist.
Personally, I'm opposed to software patents... that said, there's no safety from any third party wrt patents either.
I think there exist fields of invention where it's reasonable for inventors to know what's in the patent database and thus avoid unintentional infringement. Obviously software isn't one of those fields.
When it's a case where it's not possible to utilize patent research in order to help make something, and in fact ill-advised to do so, then in that space the entire purported purpose of patents in that space invalidates their use.