firefox-devtools / firefox-devtools/profiler
Fix types, or remove higher order components
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 491
- Avg merge
- 3d 46m
- Merged PRs (30d)
- 27
Description
In PR #3051, I removed most of the existential types from our codebase, but there are some in our higher order components (HOC). It would be nice to remove all of this deprecated feature.
In addition, these types would not survive a migration to TypeScript, which is #2931. In that issue I stated:
> I haven't verified this, but WithSize and WithViewport might be quite hard to translate the types. We could migrate those to hooks, which I would assume would be much easier to type.
As an experiment, I created a UseDimensions hook, which is a replacement to `WithSize`, this is PR #3053, however it's a pretty invasive change, as it's using React Hooks.
So for this issue, we should either:
* Migrate HOC to React Hooks
* Create better types with tests for HOC.
┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-343)
Contributor guide
Assessment
This issue has not been assessed yet.