Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Umbrella] Migrate to Hooks #910

Open
8 of 19 tasks
TejasQ opened this issue Feb 4, 2019 · 5 comments
Open
8 of 19 tasks

[Umbrella] Migrate to Hooks #910

TejasQ opened this issue Feb 4, 2019 · 5 comments

Comments

@TejasQ
Copy link
Contributor

TejasQ commented Feb 4, 2019

React Hooks has been merged and so it's time to rewrite our entire library in hooks to:

  1. Be cool, but also
  2. To more effectively reuse stateful logic between our components, and most importantly, to
  3. Be extra 1337.

There are 18 components that use class components and need to be migrated. Let this issue serve as an umbrella to port them over. Open separate issues if needed and update the checklist to include a link to the issue, instead of just plain text.

Components to Migrate

Internal Components

Internal Utilities

@adeelibr
Copy link
Contributor

adeelibr commented Feb 8, 2019

Can I take Foldable up next? @TejasQ @fabien0102

@fabien0102
Copy link
Contributor

@adeelibr You can! 💯

@JoshRosenstein
Copy link
Contributor

Hey guys- great library.
Im just surfing around trying to sharpen my TS & react skills. I glanced at tooltip to see if i could tackle it and looks like @fabien0102 put some work on it. But I wanted to ask if useLayoutEffect would be better for measurement hooks?

@TejasQ
Copy link
Contributor Author

TejasQ commented Feb 28, 2019

@JoshRosenstein, thanks for your amazing contributions! 🎉 How would Tooltip look with useLayoutEffect? I'm not really seeing the need for synchronicity there?

@fabien0102
Copy link
Contributor

@JoshRosenstein I would like to refactor this component since a long time (but time… you know 😅 ). useLayoutEffect fit perfectly in this use case, so if you want to play with, be my guest! 🎉
Since we need to wait for the dom to calculate the size of the tooltip, it's perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants