Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upQuestion regarding JSX #554
Comments
This comment has been minimized.
This comment has been minimized.
|
The first, as it is only 1 indent level, not 2. |
This comment has been minimized.
This comment has been minimized.
|
Thanks @dcousens |
2color
closed this
Jun 24, 2016
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
2color commentedJun 23, 2016
•
edited
I have a question regarding the combination of JSX, ternary operators and indentation.
Assuming I have the following in my
renderfunction:{ removable ? <FloatingActionButton disabled={disabled || readonly} mini onClick={this.onDropIndexClick(index)} secondary <ContentRemove /> </FloatingActionButton> : null }This is correct according to
standardhowever It feels to me that all the props should be indented one level deeper to look as follows:{ removable ? <FloatingActionButton disabled={disabled || readonly} mini onClick={this.onDropIndexClick(index)} secondary <ContentRemove /> </FloatingActionButton> : null }Which one do you think is correct and why?