React calculator: problem with binding methods

Thank you. I solved it by just changing the array to a string altogether. Hacky? Yes, but simpler.

Gotcha. Another idea might have been to make a copy of the state at the start of handleClick, push the value to the copy array with copyArray.push(e.target.value), then set the value of state to the copy array. Doesn’t mutate the original state and should still work.

gotta love react. Durn immutable state.

Then the array of ids will be a little more complicated, but the solution still stands.