plougsgaard / react-timeout

Component wrapper for setTimeout et al that cleans up after itself.
127 stars 17 forks source link

Fix issue #119 #131

Closed ishantsolanki closed 4 years ago

ishantsolanki commented 4 years ago

Since upgrade to react v16.12, the old way of getting refs throws error that the ref will not be accessible. Assigned the ref using the new useRef hook.

plougsgaard commented 4 years ago

Sorry I haven't seen this before what with everything going on.

Note to self: I'll have to update the tests and get this into a new major version because of the breaking changes within React.