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

Ternary Operator #5

Closed
cyouh95 opened this issue Jan 19, 2018 · 0 comments
Closed

Ternary Operator #5

cyouh95 opened this issue Jan 19, 2018 · 0 comments

Comments

@cyouh95
Copy link

cyouh95 commented Jan 19, 2018

Alternatively, you could simplify the linked line as:

<a className="Track-action" onClick={this.props.isRemoval ? this.removeTrack : this.addTrack}>{this.props.isRemoval ? '-' : '+'}</a>

https://github.com/jillichrome/jammming/blob/master/src/components/Track/Track.js#L36

@cyouh95 cyouh95 mentioned this issue Jan 19, 2018
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