Open alidcast opened 5 years ago
it seems that redirects are only handled programmatically, but it would be great to provide a way that makes component-level redirects compatible with server-rendering
react-router does via it's Redirect component, and using the context prop to find out what the result of the rendering was (see: https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/guides/server-rendering.md)
Redirect
context
it seems that redirects are only handled programmatically, but it would be great to provide a way that makes component-level redirects compatible with server-rendering
react-router does via it's
Redirect
component, and using thecontext
prop to find out what the result of the rendering was (see: https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/guides/server-rendering.md)