-
Notifications
You must be signed in to change notification settings - Fork 10
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
<Form /> does not respect basename (Svelte) #22
Comments
Thanks! This likely applies to both the Svelte and Vue packages which are based on the |
Fixing this bug was trivial following the issue you linked (remix-run/react-router#9352), but I immediately found another. So I don't think it would be ready for a PR. Essentially, when I'm in a nested route, say Any pointers where to look for this handling in the source? |
Actually I've narrowed it down to When using react-router-dom (same setup but react)
however the return value from
I'll see if I can grok the logic behind how this should be properly handled. |
Are you trying to use relative routes by any chance? I don't think the From a debugging standpoint, I would start in |
The feature of
<Form method="post"> ... </Form>
is that when the action is triggered, the client stays on the page, and after the action finishers the loader is triggered, so you get fresh data for that page.This works fine if your router base is
/
but not if it's nested in a subroute.Link to minimal repro on codesandbox:
https://codesandbox.io/s/remix-router-svelte-bug-ilknm4
How to repro:
Happy path (how it works on
/
)Broken (same doesn't work when nested under
/nested
)/nested
and hasbasename: "/nested"
/api/count
;The text was updated successfully, but these errors were encountered: