componentDidMount() {
    window.addEventListener('scroll', this.setContentState)
    window.addEventListener('resize', this.setWidth)
    window.addEventListener('load', this.setWidth)

    this.placeholder.style.width = `${this.sticky.offsetWidth}px`
    this.placeholder.style.height = `${this.sticky.offsetHeight}px`
  }
/**
   * Set the function that determines stickiness as the window scroll event and set
   * the width setting function on window resize and load when the component mounts.
   * @return {void}
   */
Set the function that determines stickiness as the window scroll event and set
the width setting function on window resize and load when the component mounts.
@return {void}
Set the function that determines stickiness as the window scroll event and set the width setting function on window resize and load when the component mounts . @return { void }
componentDidMount() {
    window.addEventListener('scroll', this.setContentState)
    window.addEventListener('resize', this.setWidth)
    window.addEventListener('load', this.setWidth)
    this.placeholder.style.width = `${this.sticky.offsetWidth}px`
    this.placeholder.style.height = `${this.sticky.offsetHeight}px`
  }
componentDidMount ( ) { window . addEventListener ( 'scroll' , this . setContentState ) window . addEventListener ( 'resize' , this . setWidth ) window . addEventListener ( 'load' , this . setWidth ) this . placeholder . style . width = ` ${ this . sticky . offsetWidth } ` this . placeholder . style . height = ` ${ this . sticky . offsetHeight } ` }
Set the function that determines stickiness as the window scroll event and set
 the width setting function on window resize and load when the component mounts.
Set the function that determines stickiness as the window scroll event and set the width setting function on window resize and load when the component mounts .