Skip to content

share code between hooks and classes #561

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

Closed
wants to merge 3 commits into from
Closed

share code between hooks and classes #561

wants to merge 3 commits into from

Conversation

drcmda
Copy link
Member

@drcmda drcmda commented Feb 20, 2019

First draft that would practically take hooks and classes under one roof with a shared api, using hooks as backbone. Downsides of course are regressions like "auto". Upsides are 8.x'es refreshed api and new capabilities.

@drcmda
Copy link
Member Author

drcmda commented Feb 20, 2019

This pull request introduces 1 alert when merging c7e924b into 0ebbf23 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Comment posted by LGTM.com

@jacobrask
Copy link
Contributor

I think if we remove auto it would be nice with an official way of doing it, like you recommended d3-ease when removing the easing function. So:

  1. A warning when trying to assign Animated<auto> to width/height of an animated element, with a link to:
  2. An easy refactoring path for different cases

@drcmda
Copy link
Member Author

drcmda commented Feb 22, 2019

@jacobrask Maybe there's still a way, i was thinking about perhaps adding something back like injects or a Globals.use(...) api. When i think of auto today an inject could maybe drop a resize observer (leaving polyfills to the end-user) which can update the owning controller on size changes (or flip to "auto" when needed).

This was referenced Apr 10, 2019
@aleclarson
Copy link
Contributor

Merged into #632 🎉

@aleclarson aleclarson closed this Apr 16, 2019
@joshuaellis joshuaellis deleted the classes+hooks branch March 18, 2021 18:02
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

Successfully merging this pull request may close these issues.

3 participants