title: How to load site on custom path with Redirect
body: <p>I want to load my website on url <code>https://mysite.my/main</code> instead of default <code>https://mysite.my/</code>. But the following code gives me a mistake <em>Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.</em></p>
  
  <pre><code>&lt;BrowserRouter&gt;
        &lt;Switch&gt;
          &lt;Redirect from="/" to="/main" /&gt;
          &lt;Route path="/main" component={App} /&gt;
        &lt;/Switch&gt;
  &lt;/BrowserRouter&gt;
  </code></pre>
  
  <p>Inside <code>&lt;App/&gt;</code> component I have <code>&lt;Route path="/main" component={Section} /&gt;</code>, but it doesn't seem that problem in that.</p>