Draggable sliding up panel implemented in React Native https://octopitus.github.io/rn-sliding-up-panel/
929
stars
157
forks
source link
Warning: Failed prop type: Invalid prop `children` supplied to `SlidingUpPanel`, expected one of type [function]. #213
Open
AparnaManjalavil opened 2 years ago
Issue Description
While running the app this warning is showing. How to fix this?
Code Snippets
MapComponent.js const snappingPoints = [draggableRange.top,draggableRange.bottom]; const [panelPositionVal, setPanelPositionVal] = useState(new Animated.Value(draggableRange.bottom)); const [draggableRange, setDraggableRange] = useState({ top: hp('70%'), bottom: Platform.OS==='ios'?hp('30%'):deviceHeight/2.8 }); const [allowDragging, setAllowDragging] = useState(false); const onMomentumDragEnd = useCallback((value) => { if (value === draggableRange.bottom) { setTopSpacing(0); setSlideUpAtTop(false) } else { setTopSpacing(-300); setSlideUpAtTop(true) } }, [draggableRange]);