These are chat archives for FreeCodeCamp/Help

1st
Apr 2019
Kelechi Chinaka
@ke1echi
Apr 01 11:41
i made a handleKeyPress which is suppose to trigger the sound the the key is pressed on the keyboard, but it does not work, anyone mind helping out. tnx
https://codepen.io/kelechichinaka/pen/OqKejG?editors=1011
dyon gerwen
@fullstackinprogress_gitlab
Apr 01 14:23

i get an error can please someone hlep me what im doing wrong in this react project : Internal server error: Cannot read property 'expand' of undefined

with this code


const PreFooter = ({ t, title, description, descriptionBlue, comingSoon }) => {
  const comingSoonStyle = comingSoon ? styles.isComingSoonDomain : '';

  function expand (){
    // ReactDOM.findDOMnode
      if(this.moreButton){
      this.moreButton.style.height = '10000px !important'}}


  return (
    <div styleName="pre-footer" className={comingSoonStyle} ref={ ref => this.moreButton = ref}>
      <div styleName="content-wrapper" >
        {comingSoon &&
        <h2>{t('common.buy')} {title} </h2>
        }
        {!comingSoon &&
        <h2>{title} {t('common.buy')}</h2>
        }
        <article>
          <div dangerouslySetInnerHTML={{__html: description}}></div>
          <div dangerouslySetInnerHTML={{__html: descriptionBlue}}></div>
        </article>
        <div styleName="moreButton"
              onClick={this.expand()}>more </div>
      </div>
    </div>
  );

};
Idris Fagbemi
@stwins60
Apr 01 14:52
Hi, does anyone know how to test java code using vagrant up
Eric Weiss
@eweiss17
Apr 01 17:56
@fullstackinprogress_gitlab clearly it's here, onClick={this.expand()}>more </div>, did u figure i out