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

Use measure track custom ref #1516

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dmitrij-borchuk
Copy link

@dmitrij-borchuk dmitrij-borchuk commented Sep 17, 2020

Description

According to this (#1227) issue, we need to be able to track custom Ref passed from outside of the hook. I have added overload for the case when we pass a custom hook as an argument. In this case, we return only the Element rect.

Thanks to https://github.com/PoOw for the idea of overloads.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as before)

Checklist

  • Read the Contributing Guide
  • Perform a code self-review
  • Comment the code, particularly in hard-to-understand areas
  • Add documentation
  • Add hook's story at Storybook
  • Cover changes with tests
  • Ensure the test suite passes (yarn test)
  • Provide 100% tests coverage
  • Make sure code lints (yarn lint). Fix it with yarn lint:fix in case of failure.
  • Make sure types are fine (yarn lint:types).

@macrozone
Copy link

can we have this reviewed and released?

@adeguelle
Copy link

can we have this reviewed and released?

+1
please

@dzcpy
Copy link

dzcpy commented Mar 15, 2021

You could use useMeasureDirty instead. It's already in this project but not exported.
Try

import useMeasureDirty from 'react-use/lib/useMeasureDirty';

@dmitrij-borchuk
Copy link
Author

dmitrij-borchuk commented Dec 18, 2021

So, it's a year since I have created a pull request. Looks like the repository is dead

@dzcpy
Copy link

dzcpy commented Dec 23, 2021

So, it's a year since I have created a pull request. Looks like the repository is dead

Try ahooks then, I think it's better, at least it's still maintained

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.

4 participants