Code Monkey home page Code Monkey logo

Comments (3)

VoxelMC avatar VoxelMC commented on July 29, 2024 1

Hello! I tested the code in the React, Svelte, and Vue code examples. I used the node SSR adapter, and ran using pnpm astro dev and pnpm astro build + node dist/server/entry.mjs.

Comment 1: Tested by removing the e.preventDefault() and testing behaviour in presence or absence.

  • React code reached e.preventDefault()
  • Same with Svelte
  • Same with Vue
    As far as I can see, this is working as is intended. A possible reason for misinterpretation is that a client directive was not used. This would make the form act like a normal form anyways, as though the default was not prevented!

Comment 2: Same as above, but with a client:load directive.

  • All of the components definitely need a client directive to function as is intended in the recipe!

I have not tested Solid or Preact. I can, in the future, if no one else has!

Hope this helps!


P.S. I will add that it is slightly confusing to have the code give a snippet, then ask you to modify it later like:

return A

then:

Do B
return A

Just a personal problem I had, I am not sure if others experience the same thing!

from docs.

sarah11918 avatar sarah11918 commented on July 29, 2024

@VoxelMC Would you be interested in seeing if you can improve this, maybe by reordering the sequence of the steps, and maybe adding showing the components being used with client directives?

from docs.

VoxelMC avatar VoxelMC commented on July 29, 2024

@VoxelMC Would you be interested in seeing if you can improve this, maybe by reordering the sequence of the steps, and maybe adding showing the components being used with client directives?

Yes, definitely! I'll get on that :)

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.