Когда я ввожу http://localhost: 3000 /, я получаю http://localhost: 3000 / home # / в адресной строке. Я использую BrowserRouter, который, как я понял, не должен добавлять # в adsress.
index. js
const store = createStore(
myReducer,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<App/>
</BrowserRouter>
</Provider>,
document.getElementById('root')
);
registerServiceWorker();
app. js
...
<Switch>
<Route exact path="/">
<Redirect to="/home"/>
</Route>
<Route path="/home" component={Home}/>
<Route path="/gallery" component={GalleryPage}/>
<Route path="/about" component={About}/>
<Route path="/contact" component={Contact}/>
</Switch>
заголовок. js
...
<ul className="header--Navigation">
<li className="header--Navigation__point">
<NavLink to="/home" className="header--Navigation__link">Home</NavLink>
</li>
<li className="header--Navigation__point">
<NavLink to="/gallery" className="header--Navigation__link">Gallery</NavLink>
</li>
<li className="header--Navigation__point">
<NavLink to="/about" className="header--Navigation__link">About</NavLink>
</li>
<li className="header--Navigation__point">
<NavLink to="/contact" className="header--Navigation__link">Contacts</NavLink>
</li>
</ul>
Как получить http://localhost: 3000 / home / или http://localhost: 3000 /, когда я пытаюсь загрузить http://localhost: 3000 /?