I have a basic component that I'd like to use in multiple instances with differing classes.
<div className="module module--{this.props.classModifier}" ></div>
When I render the above using <...classModifier="red" /> it doesn't affect what is rendered and the browser outputs {this.props.classModifier}
Can anybody point out where and what I'm doing wrong?
{this.props.classModifier}is treated as string instead of a variable. You have options. You can use concatenation or interpolation.