Right, but the point is that React is disciplined for you. You never do any manual HTML manipulation so you don't have to worry about injection issues.
You don't do manual HTML manipulation with this lib either. You can just see your page as being composed of components and replace components in order to update screen.
I am not familiar with the type of mistakes you are talking about. I have used both React and UIBuilder and find them to be comparable.
Would you be willing to share an example of the type of mistake that developers frequently make?