You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create-react-native-app test --with-web-support (defaults to [email protected]) cd test && npm install
Copy into App.js:
importReactfrom"react"import{Animated,PanResponder}from"react-native"exportdefaultclassAppextendsReact.Component{constructor(){super()this.state={pan: newAnimated.ValueXY()}this.panResponder={}}render(){return(<Animated.View{...this.panResponder.panHandlers}style={{transform: this.state.pan.getTranslateTransform(),borderWidth: "1"}}><Animated.Text>Open up src/App.js to start working on your app!</Animated.Text><Animated.Text>Changes you make will automatically reload.</Animated.Text><Animated.Text>Shake your phone to open the developer menu.</Animated.Text></Animated.View>)}componentDidMount(){this.panResponder=PanResponder.create({onStartShouldSetPanResponder: ()=>true,onPanResponderMove: Animated.event([null,{dx: this.state.pan.x,dy: this.state.pan.y}])})this.forceUpdate()}}
yarn web
You have a draggable (albeit slightly buggy) textbox!
Steps to reproduce:
create-react-native-app test --with-web-support
(defaults to[email protected]
)cd test && npm install
Copy into App.js:
yarn web
You have a draggable (albeit slightly buggy) textbox!
npm i -S [email protected]
yarn web
It doesn't move!
npm i -S [email protected]
It still doesn't move!
npm i -S [email protected]
And behold, it moves!
The text was updated successfully, but these errors were encountered: