Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
flipCamera() {
const newState = this.state.cameraType === Camera.Constants.Type.back
? Camera.Constants.Type.front
: Camera.Constants.Type.back;
this.setState({
cameraType: newState,
});
}private renderPhotoItem = (): React.ReactElement => {
const { themedStyle } = this.props;
return (flipCamera() {
const newState = this.state.cameraType === Camera.Constants.Type.back
? Camera.Constants.Type.front
: Camera.Constants.Type.back;
this.setState({
cameraType: newState,
});
}render() {
const { position } = this.props;
const type = Camera.Constants.Type[position];
return (
this.camera
}}
>toggleFacing = () => {
this.setState({
type:
this.state.type === Camera.Constants.Type.back
? Camera.Constants.Type.front
: Camera.Constants.Type.back,
});
}onPress={() => {
this.setState({
type:
this.state.type === Camera.Constants.Type.back
? Camera.Constants.Type.front
: Camera.Constants.Type.back,
});
}}>const Camera = ({ children }, ref) => (
);render() {
const { takingPicture } = this.state;
return (
);
}
}