
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
react-native-flip-view
Advanced tools
JavaScript implementation of a view container that can flip between its front and back
JavaScript implementation of a view container that can flip between its front and back
npm install react-native-flip-view
var React = require('react-native');
var {
View,
Easing,
TouchableOpacity,
Text,
Component,
} = React;
var FlipView = require('react-native-flip-view');
export default class Demo extends Component {
constructor(props) {
super(props);
this.state = { isFlipped: false };
}
render = () => {
return (
<FlipView style={{flex: 1}}
front={this._renderFront()}
back={this._renderBack()}
isFlipped={this.state.isFlipped}
onFlipped={(val) => {console.log('Flipped: ' + val);}}
flipAxis="y"
flipEasing={Easing.out(Easing.ease)}
flipDuration={500}
perspective={1000}/>
);
};
_renderFront = () => {
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>
);
};
_renderBack = () => {
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>
);
};
_flip = () => {
this.setState({isFlipped: !this.state.isFlipped});
};
}
.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"
]
}
FAQs
JavaScript implementation of a view container that can flip between its front and back
The npm package react-native-flip-view receives a total of 2 weekly downloads. As such, react-native-flip-view popularity was classified as not popular.
We found that react-native-flip-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.