Closed theKashey closed 6 years ago
Hey @theKashey thanks for opening this too.
I wasn't really sure what the best thing to do here was. I think I avoided it because I wasn't sure if copying the values would end up with performance issues, but honestly that seems now like not the right decision. Whenever I used to use this.setState
for things like arrays I'd always manually .slice()
them myself, so that does seem like it would be the desired behavior!
Released in 0.2.0
!
Some operations, like array.sort do mutate original value. I know, that you are aware of it, but why do you returning muted value, not mutated copy of the value? Current approach probably could poison render, as long it may change value during the render.