reactjs / reactjs/react.dev

React Routes

Open
#4,142 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

I can't found anything about BrowseRoutes, Routes, Route Section. And my issue is, when I try to use an old code example

import React from 'react';
import {
    BrowserRouter as Router,
    Routes,
    Route,
    IndexRoute,
    Link
} from 'react-router-dom';
import StoreProvider from '../components/Store/Provider';
import Login from './users/Login/Login';
import dashboard from './dashboard/dashboard';
import PageHome from './home/home';
import test from './test';

const PagesRoot = () => {
    return (
        <Router>
            
            <div className="App">
    <ul>
      <li>
        <Link to="/">Home</Link>
      </li>
      <li>
        <Link to="/test">Test</Link>
      </li>
      <li>
        <Link to="/Login">Login</Link>
      </li>
    </ul>

                <Routes>
                    <Route exact path="/" component={PageHome}  />
                    <Route exact path="/test" component={test} />
                    <Route exact path="/Login" component={Login} />
                </Routes>
                </div>
        </Router>
        
    )
}
 
export default PagesRoot;

I can't redirect to component page

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the issue's React Router example and the missing BrowseRoutes, Routes, and Route references. Clarify which routing behavior or documentation gap should be addressed, then verify that the resulting guidance explains how to route to a component.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.