Question 4 (10 marks) Write a React component that collects and displays counts of “thumbs up” and “thumbs down” as a on

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Question 4 (10 marks) Write a React component that collects and displays counts of “thumbs up” and “thumbs down” as a on

Post by answerhappygod »

Question 4 10 Marks Write A React Component That Collects And Displays Counts Of Thumbs Up And Thumbs Down As A On 1
Question 4 10 Marks Write A React Component That Collects And Displays Counts Of Thumbs Up And Thumbs Down As A On 1 (357.72 KiB) Viewed 43 times
Question 4 (10 marks) Write a React component that collects and displays counts of “thumbs up” and “thumbs down” as a one shown below. Tell us what you think? Customizable Message 12 2 Buttons Counters Each time the “thumbs up” or “thumbs down” buttons was clicked, the corresponding counter will increase by one. The message shown on top of the two buttons can be customized. Use the code excerpt below as template to implement your Poll class and the method call. <div id='app' /> class Poll extends React. Component { render() { return ( <div> <h6>Tell us what you think?</h6> <div class="btn-toolbar"> <button type="button" class="btn btn-primary" id="good" onclick={this.handleClick}> &#128077;<span class="badge badge-light">12</span></button> <button type="button" class="btn btn-primary" id="bad" onclick={this.handleClick}> &#128078;<span class="badge badge-light">2</span></button> </div> </div> ); } } ReactDOM.render(); Page 11 of 18

Put your complete Poll class and the method call here [10 marks]: class Poll extends React.Component { Page 12 of 18
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply