question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migration to hooks

See original GitHub issue

We’ve made a great start in the conversion to Function Components. This is just an issue to keep track of what we class components (public and internal) we have left. I haven’t checked if it’s feasible to convert these components, if it’s necessary or if it’s worth it.

Core

Lab

Won’t migrate

  • RootRef (soon deprecated)

Future work

The following items can be fully addressed once this effort is done:

  • Replace withTheme() with useTheme()
  • Remove withFormControlContext #16503
  • Remove withForwardedRef #16532
  • When forking refs prefer useForkRef over custom implementations
  • Move default props resolution from .defaultProps to function body #16542
  • Remove React.Component usage from the demos.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:46 (41 by maintainers)

github_iconTop GitHub Comments

2reactions
bpas247commented, Jul 22, 2019

Remove React.Component usage from the demos.

Is this task still up for grabs? I wouldn’t mind taking it, if it’s open 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hooks migration guide - Apollo GraphQL Docs
Hooks migration guide · How to integrate the new hooks API into your existing Apollo app · Core packages · Server-side rendering ·...
Read more >
How We Migrated Our Codebase To React Hooks - Life at Torii
This blogpost describes the process of migrating our codebase to React Hooks, and what I did to drive the change in the company....
Read more >
Migrating from class components to React hooks
You may have already heard of hooks as a way to use common React features without writing a class-based component. Hooks provide an...
Read more >
Introducing Hooks - React
Crucially, Hooks work side-by-side with existing code so you can adopt them gradually. There is no rush to migrate to Hooks. We recommend...
Read more >
React Hooks Migration - Robin Wieruch
This tutorial shows a migration path on how to write React Class Components as React Function Components with React Hooks.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found