Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
Trying to refactor React App to React-Redux issue w/ volume slider

I've been doing freecodecamps Drum Machine app. I was able to complete the app completely with React but I made a copy to try and get familiar with using react-redux together and I'm not doing something correct when trying to refactor the input slider. It will not change the volume of the clips and it does not update the display with the volume change.

This is my working react app React Only Drum Machine

This is the one I'm trying to refactor React-Redux Drum Machine

This is a guy that I patterned a lot of mine from trying to understand how to put into practice what I learned from freecodecamp J8ahmed Drum Machine

I think it might be something about this code here but I'm not sure

<input type="range" min="0" max="1" step=".1" value={this.props.volume} className="slider" id="myRange" onChange={(e)=>{this.props.volumeToggle(e)}}/>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Turned out it was a simple error in the App class I assigned this volumeToggle function to updateVolume but in the control class I tried to call this.props.powerToggle(). Below is the correct code. A big thank you to J8ahmed who took a look at it when I messaged him specifically and helped me see the error.

App Class

<Controls power={this.props.power} volume={this.props.volume} bank={this.props.bank} info={this.props.info} powerToggle={this.powerToggle} bankToggle={this.bankToggle} updateVolume={this.volumeToggle}/>

Controls Class

<div id="volume-container">
      <h1>Volume</h1>
      <div class="slidecontainer">
        <input type="range" min="0" max="1" step=".1" value={this.props.volume} className="slider" id="myRange" onChange={(e)=>{this.props.updateVolume(e)}}/>
      </div>
    </div>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!