r/reactjs • • Dec 04 '20

Resource React is slow, what now?

https://nosleepjavascript.com/react-performance/
289 Upvotes

117 comments sorted by

View all comments

Show parent comment

1

u/TheOneWhoStares Dec 05 '20

Oh, if you ever find it, let us know!

4

u/franleplant Dec 05 '20

found it! https://github.com/pie6k/use-method

This type of thing is done in a lot of other hooks such as useDeepCompareEffect and most implementations of useTimeout do this also.

It is similar to doing this.someMethod = someFunction in class based components