swup / docs

Official swup documentation 📘
https://swup.js.org/getting-started
12 stars 35 forks source link

Update event delegation example #148

Closed daun closed 11 months ago

daun commented 11 months ago

Description

Update the event delegation example to not use the outdated plugin example. And link to delegate-it.

Checks

netlify[bot] commented 11 months ago

Deploy Preview for splendorous-kataifi-9ae281 ready!

Name Link
Latest commit 8a5c6d62ca44e78ad6f75d96ac74369cda556d06
Latest deploy log https://app.netlify.com/sites/splendorous-kataifi-9ae281/deploys/64f0d720c645e200071d0858
Deploy Preview https://deploy-preview-148--splendorous-kataifi-9ae281.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

daun commented 11 months ago

@hirasso The page has an example import as the first code block on top. I'd rather not have import statements in all the other helper example usages as well. Users will just have to filter out more noise.

import { getCurrentUrl, updateHistoryRecord } from 'swup';
hirasso commented 11 months ago

I wouldn't mind the noise and prefer fully copy-pasteable code snippets. But I also don't care too much