fix(examples): use post action in firebase-auth-firestore example#3358
Merged
kentcdodds merged 2 commits intoremix-run:mainfrom Jun 7, 2022
Merged
fix(examples): use post action in firebase-auth-firestore example#3358kentcdodds merged 2 commits intoremix-run:mainfrom
post action in firebase-auth-firestore example#3358kentcdodds merged 2 commits intoremix-run:mainfrom
Conversation
MichaelDeBoey
requested changes
Jun 1, 2022
Fix the Firebase example when JavaScript is disabled. `method="delete"` is not a valid form action. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method While this works when JavaScript is enabled, it does not fall back gracefully. Instead, use specify form action using name + value on buttons, as shown in FAQs: https://remix.run/docs/en/v1/pages/faq#how-do-i-handle-multiple-forms-in-one-route
6b79045 to
88207b9
Compare
machour
approved these changes
Jun 1, 2022
MichaelDeBoey
requested changes
Jun 1, 2022
Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
MichaelDeBoey
approved these changes
Jun 6, 2022
post action in firebase-auth-firestore example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the Firebase example when JavaScript is disabled.
method="delete"is not a valid form action.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method
While this works when JavaScript is enabled, it does not fall back gracefully.
Instead, use specify form action using name + value on buttons, as shown in FAQs:
https://remix.run/docs/en/v1/pages/faq#how-do-i-handle-multiple-forms-in-one-route
Closes: a bug I encountered while working on the Firebase example - no open issue.
Testing Strategy:
In order to test this manually, I ran the Firebase example with JavaScript enabled and ensured: