# Potential challenges upgrading to v8
(And mitigation strategies)
- We moved stuff, so deep imports will no longer work
- Mitigations (in 7):
- more codemods
- for any things which weren't re-exported previously, and we added new official supported top-level files, ensure those are added in 7 too
- add re-exports and top-level files for the remaining things that people are using
- Props: deprecated, removed/renamed, or callback signature changes
- (Enumerate these)
- Mitigations (some in 7, some not possible ahead of time):
- make as many props available in previous release as possible
- more codemods (fix or warn)
- add debug warnings in 7
- Implicit changes to controlled/uncontrolled behavior
- (Enumerate these)
- We ran into this with TextField in 7 and it was definitely a problem for people
- Mitigations:
- Make a list of all these cases, and make a codemod which warns about it
- Again make things available opt-in for previous release
- Make a "semicontrolled" HOC to restore old behavior in cases where that was the change
- Requires things to have an onChange prop
- Unknowns around perf
- We did some basic testing, but there could be some perf issues which will only show up with more realistic/complex scenarios in apps (FC changes could be like this)
- Can we find a partner to test this with on their real app? (Ideally someone who already has perf tests, but we could try pointing flamegrill at an app.)
- All or nothing. v8 or v7 (or double bundle size).
- Renamed sub-packages
- Mitigation:
- codemods again (this one should be easy)
- specific work where needed to make configs less sensitive to "under the hood" package names
- New button has siginificant API changes which can be costly to adopt (but adoption can be deferred/incremental)
- Function component-related
- Need to wrap certain test operations with converted components (or even anything which uses those components indirectly) in `act()`
- Mitigation: probably not possible (too hard to automatically detect where it's needed)
- `findDOMNode` will no longer work on converted components
- Mitigation: maybe write a codemod to warn about this?
- If someone was passing `ref` to a converted component, it will no longer return a class instance
- Mitigation: write a codemod to either warn or possibly update to use componentRef? (auto-update is an imperfect solution since not all the same properties are available; also since in theory they could have been using both)
- If someone was using `ref` or `componentRef` to access a converted component's `state`, that will no longer work.
- Mitigation: might be possible to write a codemod to warn about this?
- Class extension of converted components will break (hopefully this isn't done...but realistically it's probably out there)
- Mitigation: might be possible to write a codemod to warn about this?
- Specific components:
- OverflowSet: will removing wrapping FocusZone cause problems?
- (finish going through release notes)
- Changes to how to use keytips
- Hopefully this will only affect a few teams (WAC)
- Mitigation: ? (lower-pri unless usage proves to be more widespread than thought)
## And benefits!
- Smaller, faster Button
- Function components will probably minify slightly smaller
- We're working towards splitting packages. This is a bit painful right now, but once we have this, the "all or nothing" issue will be less of a problem.
-