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

chore: remove unnecessary useMemo #413

Merged
merged 1 commit into from
Apr 24, 2021
Merged

chore: remove unnecessary useMemo #413

merged 1 commit into from
Apr 24, 2021

Conversation

vonovak
Copy link
Contributor

@vonovak vonovak commented Apr 21, 2021

Please provide enough information so that others can review your pull request:

Motivation

hi, firstly, thanks for the amazing library!

This is just a small PR that removes a useMemo, which is unnecessary to have in this case: the result of the computation is a boolean, and doing a trivial comparison (_providedHandleComponent !== null) is more readable and also faster than memoizing the result.

Thanks again! :)

@gorhom gorhom added the v2 Written in Reanimated v1 label Apr 24, 2021
@gorhom gorhom merged commit 4200dd8 into gorhom:master Apr 24, 2021
@gorhom
Copy link
Owner

gorhom commented Apr 24, 2021

Thanks @vonovak :)

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

Successfully merging this pull request may close these issues.

2 participants