Closed chrisirhc closed 5 years ago
It seems that react-router does not support this. We don't want to add support on top of react-router into this plugin, since it should just setup and use react-router. Perhaps this could be a ticket on react-router or a different plugin needs to be created.
Does react-router have official support for server-side handlers?
I'd think this would need to come from fusion.js since fusion's ctx
is not something react-router
would understand.
That probably means we need a separate plugin then. However, my thought was that it'd be an ask from other users of fusion.js .
Type of issue
Feature request
Description
There seems to be no way to set up redirects (302s) to external urls. I understand this might be to keep consistent behavior with react-router v4's browser redirect behavior. Perhaps we can offer an
<ExternalRedirect>
component infusion-plugin-react-router
to workaround this? Alternatively, if there's some way of doing this otherwise, please document it.Current behavior
Right now, in order to set up an external redirect route, I'm doing this. This method is clearly sub-optimal since the browser is loading the page with a null component just to redirect (and there's no way to leverage 302 status code here):
Expected behavior
Support a syntax like: