score:1

const styles = {
  container: {
   backgroundColor: '#ff9900',
   ...
   ...
   textAlign: 'center'
  }
}

export default class App extends React.Component {
  render() {
    return(
      <div className="container" style={styles.container}>
      // your other codes here...
      </div>
    );
  }
}

score:27

That's because in React, the style prop takes an object instead of a semicolon-separated string.

<div id="sidebar" style={{display : 'inline-block'}} >
  <script src="build/sidebar.js"></script>
</div>
<div id="map-canvas" style={{display: 'inline-block', width: '20%', height: '50%'}}>
</div>

Edit:

So this:

return <div style="display: inline-block;">

Would become this:

return <div style={{display: 'inline-block'}}>

Related Query

More Query from same tag