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

[Bug]: Basename is case sensitive #7997

Closed
dhulme opened this issue Sep 2, 2021 · 4 comments
Closed

[Bug]: Basename is case sensitive #7997

dhulme opened this issue Sep 2, 2021 · 4 comments

Comments

@dhulme
Copy link

dhulme commented Sep 2, 2021

What version of React Router are you using?

6.0.0-beta.2

Steps to Reproduce

Create a basic router with a basename like below (or https://codesandbox.io/s/practical-waterfall-g9770?file=/src/App.js)

export default function App() {
  return (
    <BrowserRouter>
      <Routes basename="/app">
        <Route path="/" element={<h1>Home page</h1>} />
      </Routes>
    </BrowserRouter>
  );
}

Visit /APP

Expected Behavior

/ route renders because basename matches (ignoring case), as mentioned in #4866

Actual Behavior

/ route does not render

@chaance
Copy link
Collaborator

chaance commented Sep 2, 2021

@mjackson Perhaps it makes sense to include a caseSensitive prop on Routes that applies to the basename, perhaps it sets the default for all nested routes as well. Thoughts?

@mjackson
Copy link
Member

mjackson commented Sep 2, 2021

I think we just always assume basename is not case sensitive for now. We can add a caseSensitive prop later if someone really needs it.

@chaance
Copy link
Collaborator

chaance commented Sep 3, 2021

Fixed in #8000

@chaance chaance closed this as completed Sep 3, 2021
@dhulme
Copy link
Author

dhulme commented Sep 3, 2021

Thank you!

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

No branches or pull requests

3 participants