react-native-steve
react-native-steve copied to clipboard
Cannot read property 'layout' of undefined
Don't have a reproduction for you, but I've observed when updating data
, the following error:
TypeError Cannot read property 'layout' of undefined
This error is located at:
in Item (at Steve.js:107)
in Items (at Steve.js:200)
in RCTView (at View.js:32)
in View (at createAnimatedComponent.js:448)
in AnimatedComponent(View) (at createAnimatedComponent.js:459)
in AnimatedComponentWrapper (at Steve.js:199)
in RCTView (at View.js:32)
in View (at createAnimatedComponent.js:448)
in AnimatedComponent(View) (at createAnimatedComponent.js:459)
in AnimatedComponentWrapper (at Steve.js:198)
in PanGestureHandler (at Steve.js:195)
I've also noticed that layout recalculation isn't performed when updating data
(items may overlap each other). The library should support data
updates, or at a minimum warn users.
@braincore Hi. Thanks for letting me know. I really don't have free time to solve the problems in the project and can't promise when I can fix the problem. Contibutions are welcome :)
No time here either :). I've already worked around the issue by unmounting/remounting the component when data changes. Hopefully anyone else who encounters this issue will see this. Thanks a lot for this project!
@braincore Thanks for your understanding. I'll take some time and try to figure it out tomorrow.
@braincore Hi! Found a good solution to the issue. Please pull the changes and give it a try to see if it works for you too meanwhile I'll try to fix the other issues. https://github.com/tsdmrfth/react-native-steve/pull/27
Metro has trouble compiling.
error: Error: Unable to resolve module hooks from /Users/ken/src/superego/mobile/IntertimesMobile/node_modules/react-native-steve/src/Steve.js: hooks could not be found within the project or in these directories:
node_modules
../../../node_modules
Why did you add hooks
as a sub-package?