recoil-undo icon indicating copy to clipboard operation
recoil-undo copied to clipboard

Start batch when tracking atoms

Open brunozoric opened this issue 4 years ago • 0 comments

Heya!

I found an issue with startBatch when using track atoms functionality. When you run startBatch() it takes present state and pushes it to the history past and if there are no changed atoms history state remains like there were some changes. When you go "undo" you actually do not undo since previous state is same as current state. And if you started/ended batch few (dozen times) you have dozens of equal states in history.past array.

I'll try to fix, but if you have an idea how to do it, I'm all ears :)

brunozoric avatar Oct 30 '20 18:10 brunozoric