Comments (3)
So you could argue that non-standard method behavior belongs at the server level outside of Remix since Remix will never be able to leverage it.
I basically convinced myself of this as I wrote the issue 😅
I'll leave it to you and the team whether you want to implement this or not, but now you've got something concrete you can point people towards when they ask why resource routes don't support non-standard HTTP methods.
from react-router.
Whether it handles the request through the loader or action is an open question
It looks like these new ones have fairly well defined semantics - https://www.ibm.com/docs/en/i/7.5?topic=concepts-webdav seems to indicate PROPFIND
might be the only non-mutating one.
However, if we implement this, I want to avoid having to continually update the list of methods in the future as new ones might come around, so I would probably vote for a looser implementation of:
- Resource routes accept any method
- We send any unknown methods (i.e., not included in this list) to the
action
and make no assumptions about whether or not it mutates anything
I'm still not convinced we should implement this though :). Resource routes are API routes that play nicely within the Remix data patterns. They can be hit from fetchers, use client loaders, leverage single fetch, etc. A Remix request (from a fetcher
or useSubmit
) will never send one of those non-standard methods. So you could argue that non-standard method behavior belongs at the server level outside of Remix since Remix will never be able to leverage it.
from react-router.
ok cool - I'm going to close this out for now. AFAIK this was the first time that limitation came up so it's not a high-demand thing - if it ever becomes a higher requested issue we can certainly revisit. Thanks for taking the time to dig in!
from react-router.
Related Issues (20)
- [Bug]: Spurious rerender at the start of a load HOT 4
- [Bug]: HashRouter need to wrapped twice HOT 1
- [Bug]: returning `replace` from loader replaces an extra entry HOT 8
- [Bug]: When the page returns, there is a noticeable delay/latency. HOT 1
- [Bug]: Navlink className function props not work as expected it HOT 2
- [Docs]: Switched parameters in matchPath HOT 1
- [Bug]: Unable to match a url that ends in an equal sign HOT 1
- [Bug]: optional segments with dynamic segments HOT 1
- [Bug]: State is not preserved in a component tree when switching to render via custom `<Routes location={location}>` prop
- [Bug]: undefined is not an object (evaluating ' request.signal.aborted ')
- [Bug]: "TypeError: URL constructor: // is not a valid URL" while using data router HOT 9
- [Bug]: Relative option is not work in useNavigate HOT 3
- [Bug]: (a11y)-Multiple accessibility issues with React-Router HOT 1
- [Bug]: The global state manager does not work in conjunction with react-router-dom HOT 1
- [Bug]: encoded # in path parameter causes route to be evaluated differently
- [Bug]: generatePath/matchPath don't handle encoding/decoding `/` the same HOT 1
- [Bug]: react-router seems to depend on vulnerable versions of path-to-regexp HOT 8
- [Bug]: react-router-dom v5 uses vulnerable version of path-to-regexp HOT 6
- [Bug]: Mount happens twice on forward navigation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-router.