Skip to content

Conversation

daun
Copy link
Member

@daun daun commented Sep 25, 2024

Description

Document new visit.meta object for passing along custom data:

swup.hooks.on('visit:start', (visit) => {
  visit.meta.lorem = 'ipsum';
});

swup.hooks.on('page:view', (visit) => {
  console.log(visit.meta.lorem); // 'ipsum'
});

Checks

  • The PR is submitted to the master branch
  • The code was linted before pushing (npm run lint)
  • All tests are passing (npm run test)
  • New or updated tests are included
  • The documentation was updated as required

@netlify
Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for splendorous-kataifi-9ae281 ready!

Name Link
🔨 Latest commit 81a3ee8
🔍 Latest deploy log https://app.netlify.com/sites/splendorous-kataifi-9ae281/deploys/66f56d09bb3d7c00098e8309
😎 Deploy Preview https://deploy-preview-206--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 daun requested a review from a team September 25, 2024 19:04
@daun daun merged commit c7e30f2 into master Sep 26, 2024
5 checks passed
@daun daun deleted the content/visit-meta branch September 26, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants