title: How can I ensure that my user goes to a specific path (written in the url) via React-Router-Dom without automatically going to the default home page?
body: <p>I'm currently running into an issue where if a user types in <code>localhost:3000/resume</code>, it would default back to <code>localhost:3000</code>. It works just fine when I click the button I wrote to specifically navigate to the resume page, but I want it so that if they type in that specific path in the URL they should be able to visit that page without having to start from the landing page and navigating to there. Here is my code that contains the Router</p>
  <p><strong>App.js</strong></p>
  <pre><code>import React from 'react';
  import './App.css';
  import LandingPage from './pages/LandingPage/LandingPage';
  import {Route,Router, Redirect} from 'react-router-dom';
  import history from './history';
  import Projects from './pages/Projects/Projects';
  import Experiences from './pages/Experiences/Experiences';
  import Resume from './pages/Resume/Resume'
  
  function App() {
    return (
      &lt;div className=&quot;App&quot;&gt;
        &lt;Router history = {history}&gt;
          &lt;Route path = &quot;/&quot; component = {LandingPage} exact/&gt;
          &lt;Route path = &quot;/projects&quot; component = {Projects} exact/&gt;
          &lt;Route path = &quot;/experiences&quot; component = {Experiences} exact/&gt;
          &lt;Route path = &quot;/resume&quot; component = {Resume} exact/&gt;
          &lt;Redirect to = &quot;/&quot;/&gt;
        &lt;/Router&gt;
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>
  <p><strong>history.js</strong></p>
  <pre><code>import  {createBrowserHistory} from &quot;history&quot;;
  
  export default createBrowserHistory()
  </code></pre>