There are a couple of ways to indent JSX code. Which style you find to be the best:
One liners
return <div className="well" style={{ border: "1px solid orange", padding: "2rem" }}>
Content
</div>
Line per attribute, regular indent
return <div className="well"
style={{
border: "1px solid orange",
padding: "2rem"
}}>
Content
</div>
Line per attribute, aligned
return <div className="well"
style={{
border: "1px solid orange",
padding: "2rem"
}}>
Content
</div>
Multiline
return (
<div
className="well"
style={{
border: "1px solid orange",
padding: "2rem"
}}
>
Content
</div>
)
Cliff Rowley
Thinker, Tinkererer, Dork.
Quique Borredá
Passionate about web since 1991
Mainly Multiline, although most times I enclose the jsx return between ( ) just for clarity ..
return ( <div whatever={whatever}> Content </div> );