Config Options
Used for implementing dynamic swapping in frameworks.
When Swapy is used in vanilla JavaScript, swapping happens by directly manipulating the DOM. This will not work properly in frameworks (like React) for dynamic use cases, where slots and items can be added or removed by the user.
To make this work, Swapy needs to hand DOM updates over to the framework, by setting manualSwap: true
. Each framework has its own way for that. But Swapy provides a few helpers to make it easy to set up.
Here are a few examples: