nikhilaravi / react-native-smart-scroll-view

A smart scroll view component with handling of keyboard events
MIT License
153 stars 31 forks source link

TypeError: Cannot read property '_currentElement' of null #19

Open burgalon opened 8 years ago

burgalon commented 8 years ago

_container is not set at the time of the call... Using react-native-smart-scroll-view 1.3.5 and RN 0.24.1

image

nikhilaravi commented 8 years ago

@burgalon sorry for the late reply! did you manage to get this working? let us know and @jrans and I can take a look!

idajimenez commented 8 years ago

@nikhilaravi I also encountered this error. May I know how can I fix it? Thanks

pietgk commented 8 years ago

i noticed this error when using functions as component, resolved it by going back to using components that extend from component.

nikhilaravi commented 8 years ago

@pietgk thanks for the note - do you mean functional components? That could be an issue as according to the React spec

Since no component instance is created for a functional component, any ref added to one will evaluate > to null.

and _container is added as a ref.

@idajimenez did you manage to resolve the issue?

pietgk commented 8 years ago

I changed from this component to react-native-keyboard-aware-scroll-view its simpler and does enough for me.