title: How to generate a sitemap dynamically in React JS
body: <p>I am using react-router-dom for routing in my react app, There are nearly 5000 pages (which are generated dynamically based on API), now I don't know how can I generate a sitemap for these dynamic pages</p>
  <p>Piece of code from my Routes component</p>
  <pre class="lang-js prettyprint-override"><code>&lt;Route
    path={process.env.PUBLIC_URL + '/genres/:name'}
    exact
    component={MovieGenre}
  /&gt;
  &lt;Route
    path={process.env.PUBLIC_URL + '/discover/:name'}
    exact
    component={DiscoverMovies}
  /&gt;
  &lt;Route
    path={process.env.PUBLIC_URL + '/find/:query'}
    exact
    component={SearchPage}
  /&gt;
  &lt;Route
    path={process.env.PUBLIC_URL + '/moviesdetail/:id'}
    exact
    component={MovieScrees}
  /&gt;  
  </code></pre>