react-native-web
react-native-web copied to clipboard
ScrollView: support for contentOffset prop
when I use ScrollView work in Carousel Component. I need the prop. I want to know why not support?
this prop...
Any news regarding this?
Any news regarding this?
@necolas
Please
For the time being I've gotten around this by using useEffect() on the scrollview ref and setting scrollTo without any animation on screen load.
import React, { useEffect, useRef } from 'react'
import { Text, ScrollView } from 'react-native'
export default function ScrollViewTest(props) {
const scrollView = useRef();
useEffect(() => {
scrollView.current.scrollTo({x: spacing, animated:false})
}, [])
return (
<ScrollView ref={scrollView}>
<Text>Testing...</Text>
</Scrollview>
)
}