mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
2ae4c62158
In the current implementation, pendingProps is null if there are no new props since the last commit. When that happens, we bail out and reuse the current props. But it makes more sense to always set pendingProps to whatever the next props will be. In other words, pendingProps is never null: it points to either new props, or to the current props. Modeling it this way lets us delete lots of code branches and is easier to reason about bail outs: just compare the pending props to the current props.