Skip to content

Instantly share code, notes, and snippets.

@calincrist
Created April 15, 2020 08:03
Show Gist options
  • Save calincrist/404619fb72bc56905147d0cbe4a94ea4 to your computer and use it in GitHub Desktop.
Save calincrist/404619fb72bc56905147d0cbe4a94ea4 to your computer and use it in GitHub Desktop.
// src/screens/Camera.js
// …imports
const CameraScreen = ({ … }) => {
const { navigate } = useNavigation();
const takePicture = async () => {
if (this.camera) {
// …
Analytics.logEvent("add_image", {
"take_picture": true,
"camera_roll": false
});
navigate('ImagesList');
}
}
return (
// …
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment