Skip to content
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

feature: add isomorphic <Redirect/> component (closes #412) #466

Merged
merged 1 commit into from
Feb 4, 2023

Conversation

gbj
Copy link
Collaborator

@gbj gbj commented Feb 4, 2023

This creates a <Redirect/> component in the router that does two things

  • when rendered on the server, sets appropriate headers to redirect to the given path
  • when rendered on the client, uses client-side navigation to navigate

This can be mounted at a particular route in the <Route/> tree (see the router example), or can be rendered inline in a component.

@gbj gbj merged commit 4034aa9 into main Feb 4, 2023
@gbj gbj deleted the redirect-component branch February 4, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant