score:3

Accepted answer
const LIST_STYLE = {
  padding: 0,
  margin: 0,
  listStyle: "none",
};

class Masonry extends React.Component {
  // this.listStyle
  listStyle = {
    padding: 0,
    margin: 0,
    listStyle: "none",
  };

  // or Masonry.listStyle
  static listStyle = {
    padding: 0,
    margin: 0,
    listStyle: "none",
  };

  // or this.listStyle
  constructor() {
    this.listStyle = {
      padding: 0,
      margin: 0,
      listStyle: "none",
    };
  }
}

score:1

const listStyle = {
    padding: 0,
    margin: 0,
    listStyle: 'none',
};

class Masonry extends React.Component {
   ...

   render() {
       ...
    return (
            <div style={this._getContainerStyle()} ref={this.container}>
                <ul ref={this.list} style={listStyle}>
                    {mounted && items.map((item, index) => this.renderItem({ index, item, maxIndex }))}
                </ul>
            </div>
        );

   }

...
}

Related Query

More Query from same tag