Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Improve click tracking example #37

Merged
merged 2 commits into from
May 20, 2024
Merged

Docs: Improve click tracking example #37

merged 2 commits into from
May 20, 2024

Conversation

tordans
Copy link
Contributor

@tordans tordans commented May 20, 2024

A few things that improve this example IMO

  • remove isPjax reference which looks like something from laravel(?) and is not part of the codebase
  • add preventDefault which is needed here IMO
  • use openPage which is a nice helper to use here IMO
  • suggest preserving the page search params with params

@ai
Copy link
Member

ai commented May 20, 2024

remove isPjax reference which looks like something from laravel(?) and is not part of the codebase

It is abstract code, not real one. But we can remove it, sure.

add preventDefault which is needed here IMO

Agree

use openPage which is a nice helper to use here IMO
suggest preserving the page search params with params

Here we have not an exact link, but all links in the app. So we can’t use direct router and it is better just to parse href from link.

@tordans
Copy link
Contributor Author

tordans commented May 20, 2024

Here we have not an exact link, but all links in the app. So we can’t use direct router and it is better just to parse href from link.

I updated this PR

@ai ai merged commit 1edba9b into nanostores:main May 20, 2024
3 checks passed
@ai
Copy link
Member

ai commented May 20, 2024

Thanks!

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