react-native-flip-view
JavaScript implementation of a view container that can flip between its front and back
Demo
Installation
npm install react-native-flip-view
Example
var React = ; var View Easing TouchableOpacity Text Component = React; var FlipView = ; { superprops; thisstate = isFlipped: false ; } { return <FlipView style=flex: 1 front=this back=this isFlipped=thisstateisFlipped onFlipped= {console;} flipAxis="y" flipEasing=Easing flipDuration=500 perspective=1000/> ; }; { return <View style=flex: 1 backgroundColor: '#81D4FA' justifyContent: 'center' alignItems: 'center'> <TouchableOpacity style=backgroundColor: 'black' padding: 20 onPress=this_flip> <Text style=fontSize: 32 color: 'white'>Flip to Back!</Text> </TouchableOpacity> </View> ; }; { return <View style=flex: 1 backgroundColor: '#1565C0' justifyContent: 'center' alignItems: 'center'> <TouchableOpacity style=backgroundColor: 'black' padding: 20 onPress=this_flip> <Text style=fontSize: 32 color: 'white'>Flip to Front!</Text> </TouchableOpacity> </View> ; }; { this; };
.babelrc:
"retainLines": true "whitelist": "es6.arrowFunctions" "es6.blockScoping" "es6.classes" "es6.constants" "es6.destructuring" "es6.modules" "es6.parameters" "es6.properties.computed" "es6.properties.shorthand" "es6.spread" "es6.templateLiterals" "es7.asyncFunctions" "es7.trailingFunctionCommas" "es7.objectRestSpread" "es7.classProperties" "es7.decorators" "flow" "react" "react.displayName" "regenerator"