Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force consistent spacing with classes and html with react #10

Open
mcrowder65 opened this issue Jun 6, 2018 · 0 comments
Open

Force consistent spacing with classes and html with react #10

mcrowder65 opened this issue Jun 6, 2018 · 0 comments

Comments

@mcrowder65
Copy link
Owner

mcrowder65 commented Jun 6, 2018

//This shouldn't be allowed
      <Card className={styles.card}>
    name: {name} <br/>
    itemId: {itemId}<br/>
      </Card>

// This is acceptable
<Card className={styles.card}>
     name: {name} <br/>
     itemId: {itemId}<br/>
</Card>

Classes

// This shouldn't be acceptable
class FirstGraphqlComponent extends React.Component {
    state = {
      input: "",
    }

  onInputChange = e => {
    this.setState({ input: e.target.value });
  }
}

// This is acceptable, however
class FirstGraphqlComponent extends React.Component {
  state = {
    input: "",
  }

  onInputChange = e => {
    this.setState({ input: e.target.value });
  }
}
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

No branches or pull requests

1 participant