Closed lukashlavacka closed 6 years ago
This fixes a bug when upgrading to React 16. Any chance of getting this merged?
The re-use of tempArray
seems like an unnecessary optimisation anyway.
Please merge this!
@mpowaga Hi, would it be possible to merge this fix? Because it is critical for supporting React 16.
The same issue has been solved in #121 but thanks for sending this PR @lukashlavacka!
After updating my project to react@16.0.0 I experienced strange issue where position of handles would be wrong on initial load. After debugging I determined the issue is caused by re-use of
tempArray
to generate some arrays. As far as I know react uses simple object equality===
when detecting changes of props and state. Because the array was re-used in some cases react would fail to detect changes in style object.Fixes #115