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

Custom Client Directives #583

Merged
merged 5 commits into from
Jun 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update custom-client-directives.md
bluwy authored May 13, 2023
commit 2ad887acee892c1488eca6c8a69a2f9fc618848d
2 changes: 2 additions & 0 deletions proposals/custom-client-directives.md
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ Some examples of custom directives that people have wanted in the past:
- Allowing overriding builtin directives.
- Allowing for additional customization via new types of directives outside of `client:`.
- Allowing multiple directives to run at the same time.
- Replay interaction on hydrate, e.g. if a `client:click` directive hydrates on clicking the button, Astro doesn't replay the click event to trigger some reaction after it hydrates. The user has to click the (now hydrated) button again to trigger a reaction.

Previously goals in Stage 2:
- Refactor the implementation of `client:` loading to get rid of the precompile step (this is a core repo refactor / improvement).
@@ -113,6 +114,7 @@ An e2e test will be setup to make sure the client directive API works and loaded
- Opens up partial hydration code pattern
- Future builtin client directives are breaking changes
- Third-party Astro libraries could rely on non-standard client directives
- Users could bring in large dependencies, causing big file sizes for a client directive

# Alternatives