i need hand of help. I have input type range (value slider) and icons on my react page. Slider by moving it changes value of sum variable.(Its Done). Icons must on click toggle each true/false state and add each value to sum variable if false or remove its value if true. It is something like basket system. Question is, how to easy handle this job? 1 each icon on click must highlight 2 each icon on click must check its state if false then add price to total if true remove price from total.
Have you tried something like this?
function Form() {
function handleSubmit(e) {
e.preventDefault();
console.log('You clicked submit.');
}
return (
<form onSubmit={handleSubmit}>
<button type="submit">Submit</button>
</form>
);
}