Skip to content

Add camera screen#2

Open
jakuboczkowskirwm wants to merge 7 commits intomasterfrom
add_camera_creen
Open

Add camera screen#2
jakuboczkowskirwm wants to merge 7 commits intomasterfrom
add_camera_creen

Conversation

@jakuboczkowskirwm
Copy link

No description provided.

import CurrentUser from '../helpers/current-user';

class HomeScreen extends React.Component {
componentDidMount = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't have to use arrow function right here,

componentDidMount() {}

constructor(props) {
super(props);

this.state = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't have to destruct this ones, you can easly add

state = {
  a, b
}

and remove constructor method.

constructor(props) {
super(props);

this.state = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as same as above

if (this.camera) {
const options = {quality: 0.5, base64: true};
const data = await this.camera.takePictureAsync(options);
console.log(data.uri);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary console log, please remove

return (
<View style={styles.container}>
<React.Fragment>
<RNCamera
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe good idea would be to move this settings to separated config? component is unreadable because of a lot number of config lines

render() {
return (
<View style={styles.container}>
<React.Fragment>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that react fragment is useful here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants