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

Please help me to understand the code #2

Open
RahulPhpDev opened this issue Nov 10, 2024 · 1 comment
Open

Please help me to understand the code #2

RahulPhpDev opened this issue Nov 10, 2024 · 1 comment

Comments

@RahulPhpDev
Copy link

Hi, I please help me understand this.

In optimistic-retry branch , you have used onSubmit={onSubmit} action={submitMessageAction} in form, May I know why we required both if both have same job to submit the form exprct one is client side and another one is server-side-render

@aurorascharff
Copy link
Owner

Yes! So it's not actually required, but I leave the action={} as a fallback to progressively enhance the form. When the js is attached to the form on the client, only the onSubmit will run because it's preventing the default behavior.

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

No branches or pull requests

2 participants