Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

React 16 compatibility? #16

Closed
schwers-zz opened this issue Oct 24, 2017 · 1 comment
Closed

React 16 compatibility? #16

schwers-zz opened this issue Oct 24, 2017 · 1 comment

Comments

@schwers-zz
Copy link
Contributor

apologies if this is a duplicate, but is this library compatible with react 16? When I tried upgrading I'm getting the following error in React

image

I believe this is due to lines:

https://github.com/dazld/react-on-visible/blob/master/src/index.js#L39

and

https://github.com/dazld/react-on-visible/blob/master/src/index.js#L47

The react docs specify that the first argument should be a function that returns state when the second callback param is used https://reactjs.org/docs/react-component.html#setstate

@dazld
Copy link
Owner

dazld commented Nov 13, 2017

fixed in #17

@dazld dazld closed this as completed Nov 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants