A thunk optimization for virtual-dom