Replies: 1 comment
-
Okay. Sorry. I just changed it to response code 200 and it works fine with no reload of the page and the li elements are swapped. Also https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE states that 204 is with no reponse and 200 with so everything is as it should be. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I'm trying to wrap my head around Astro together with HTMX following this tutorial:
There are two things I'm trying to understand:
posts/[id].astro
to myindex.astro
page?li
element not swapped with the response fromposts/[id].astro
?This is a .gif of what is happening when I run the code:
Below are the important parts of my source code. Maybe someone can give me a pointer?
Thanks
db.json
Content is taken from https://jsonplaceholder.typicode.com/posts
index.astro
posts/[id].astro
astro.config.mjs
Beta Was this translation helpful? Give feedback.
All reactions