destroy
destroy()
destroy()button.destroy()Usage
useEffect(() => {
const button = new ButtonDynamicPrice({
price: 99.99,
apiKey: "your_api_key"
});
buttonRef.current.appendChild(button.render());
// Cleanup function
return () => {
button.destroy(); // Remove button and close modal
};
}, []);Last updated
Was this helpful?