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

feat: add post using destr to pass an object of data to a client side script in astro #252

Open
chrisvaillancourt opened this issue Sep 20, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@chrisvaillancourt
Copy link
Owner

Use destr to parse a JSON string in a client side script.

Astro's docs on passing data from the server side to client side only show how to pass simple strings to client side scripts. With this approache can pass a stringified object that we parse client side.

Also add an example showing the parsing done in a worker.

@chrisvaillancourt chrisvaillancourt added the enhancement New feature or request label Sep 20, 2024
@chrisvaillancourt chrisvaillancourt self-assigned this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant