Skip to content

Conversation

@leoyli
Copy link

@leoyli leoyli commented Aug 4, 2019

Hi, thank you for creating this amazing library!

I've noticed there are some performance improvements can be done by using useMemo in useEventCallback hook. The change basically leverage the lazy evaluations and reduce new object creations at run-time.

Thank you!

@Brooooooklyn
Copy link
Contributor

Please squash your commits, and edit your commit follow the guide: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines

@leoyli
Copy link
Author

leoyli commented Aug 10, 2019

@Brooooooklyn, thanks fixed.

@Brooooooklyn
Copy link
Contributor

Brooooooklyn commented Aug 11, 2019

unit test failed in circleci @leoyli

@leoyli
Copy link
Author

leoyli commented Aug 11, 2019

@Brooooooklyn, is that due to the code is running under react 16.9, based on the release post, there are some change in the testing utility?! I changed nothing but squash my commits, last time it passed.

@Brooooooklyn
Copy link
Contributor

It's React 16.9 already in master branch, and all tests were passed.
So could you please double check your changes and pass the tests in your local machine?

@BlackHole1
Copy link

@leoyli @Brooooooklyn Change the code to the following to pass the test:

- const returnedCallback = useCallback((e: EventValue) => event$.next(e), [event$]) + function eventCallback(e: EventValue) { + return event$.next(e) + } + const returnedCallback = useCallback(eventCallback, [event$])

https://github.com/LeetCode-OpenSource/rxjs-hooks/pull/65/files#diff-a4eb4268013ae7511c07e3266bf23937R62

@Miloas
Copy link
Contributor

Miloas commented Mar 31, 2021

Closed because of 9b86698

@Miloas Miloas closed this Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants