That's true. We have about 25,000 React components at Facebook (counting both web and mobile) and 300 more written every week, so there's certainly a huge codebase that we need to keep running.
For simple changes like an API rename, we normally just use find and replace.
For complex changes when it's hard to find the problematic code by grepping through the code, we generally add a runtime warning in React first. We intercept all React warnings that happen during development and log them to our servers so that the React team can sift through them later and see which components in our codebase are causing warnings. At that point it's usually not too hard to fix up each component by hand.
For changes where it's fairly easy to find the code but modifying it is nontrivial, we write an automated "codemod script" to parse the JS and modify the syntax automatically. My coworker Christoph gave a talk about how this works at JSConf last year: https://www.youtube.com/watch?v=d0pOgY8__JM.
As a recent example, Christoph and my intern Keyan built a complex script to convert most components from React.createClass to ES6 classes at https://github.com/reactjs/react-codemod#class. We ran this over our code at Facebook this summer and converted over 10,000 components automatically. For a taste of the output, see the changes in React Native here: github.com/facebook/react-native/commit/a2fb703bbb – just imagine that commit but 100x bigger and you'll have an idea of what we went through in our internal code. We'll likely publicize this script more in the coming months and encourage people to use ES6 classes.