I am moving my react app from self managed webpack build to a create-react-app based one. My styles are not compiling correctly, for example, in my main render method:
return (
<Grid>
<Row style={headerStyle}>
<Col xs={12}>
<h1 style={{'text-align': 'center', 'color': 'white'}}>
Dashboard v0.3
</h1>
</Col>
</Row>
</Grid>
)
I get the error Warning: Unsupported style property text-align. Did you mean textAlign?. There are a bunch of errors like this. Any help would be appreciated.
You are using the wrong syntax. It should be like this:
<h1 style={{textAlign: 'center'}} >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With