Methods
Destroying Swapy instance.
Calling swapy.destroy() will clean up any event listeners and any stored state associated with the instance.
swapy.destroy()
When using a framework, it’s recommended to call it in the component’s destroy hook function.