This is a rough demo illustrating how to dynamically reload and unload the PayPal buttons using Svelte.
Note that you will need to have Node.js installed.
Install the dependencies...
npm install
...then start the app:
npm run dev
Navigate to localhost:8080. You should see your app running.
To create an optimised version of the app:
npm run build
Install vercel
if you haven't already:
npm install -g vercel
Then, from within your project folder:
cd public
vercel deploy --name my-project