mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Ideally we shouldn't use the `.alternate` to access previous state because ideally Fibers shouldn't have alternates. The only case it's ok to use it is when it is used to identity the stateful part of a component's identity. In a non-alternate Fiber model there would instead be another object that represents instance but in the current model it's modeled by the pair. It's not ok is to get the previous state of the tree since that would not live on the stateful part. We don't generally need this though because we have the previous state on instance.data before updating it, or passed from above.
This directory contains code shared between several DevTools packages:
- /packages/react-devtools-core
- /packages/react-devtools-extensions
- /packages/react-devtools-inline
It is not published or released anywhere directly.