Here's an example of something I want to do and currently throws an error. I'm not sure I understand why, but it's not syntactically correct to export, assign default, and assign a variable on one line. The benefit of having it be an anon function is that i can use the fat arrow =>
and open up a return value with (
and )
instead of opening {
and }
to return
jsx
.
export default let Checkbox = (props) => (
<div style={styles.checkboxContainer}>
<input styleName={styles.checkbox} type="checkbox" />
<span styleName={styles.checkboxStyled}></span>
</div>
)
Is there a way to do this all in one line? Is there a good reason why I can't / why it's not in the spec?