open-index/open-npm huggingface dataset:
npm package: @jungle-mob/react-sitemap
Description: React Router Dom Sitemaps
Latest version: 1.0.0
Deprecated: this package has been deprecated

# React Router Dom Sitemaps

React Router Dom Sitemaps

# Simple use

React app 

````jsx harmony
'use strict';

import React, {Component} from 'react';
import {BrowserRouter, Switch, Route} from 'react-router-dom';


export default class Application extends Component {

    render() {
        return (<BrowserRouter>
            <div>
                <header/>
                <nav/>
                <main>
                    <Switch>
                        <Route exact path='/' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/products' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/orders' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/create/order' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/orders' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/add/waybill/to/order' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/deliveries' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/cancel/order' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/archive/orders' component={null} changefreq='monthly' priority='0.8'/>
                        <Route path='/login' component={null} changefreq='monthly' priority='0.8'/>
                    </Switch>
                </main>
                <footer/>
            </div>
        </BrowserRouter>);
    }
}
````
Generate sitemap
```js
'use strict';

import path from 'path';
import fs from 'fs';
import Sitemap from '@jungle-mob/react-sitemap';

import App from 'App/App';

const sm = new Sitemap(new App().render());
let sitemap = sm.getSitemaps('https://test.com');
sitemap = '<?xml version="1.0" encoding="UTF-8"?>' + sitemap.toString();

fs.writeFileSync(path.join(__dirname, '..', 'sitemap.xml'), sitemap);
```