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

Fix types for the useCallback hook #302

Merged
merged 1 commit into from
Jan 30, 2020
Merged

Conversation

ramnivas
Copy link
Contributor

@ramnivas ramnivas commented Jan 2, 2020

No description provided.

Implement useCallback using useMemo. Since the purpose of `useCallback`
is to guarantee _refererence_ equality, the use of React's useCallback
as the underlying implementation will require a conversion back from
`js.Function` to `scala.FunctionN` and that will create a new object
every time and thus not serve the intended purpose.
Copy link
Owner

@shadaj shadaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shadaj shadaj merged commit c6518db into shadaj:master Jan 30, 2020
@shadaj shadaj added this to the v0.6.4 milestone Jan 31, 2020
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.

2 participants