How to use the react-router-config.renderRoutes function in react-router-config

To help you get started, we’ve selected a few react-router-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dotnetcore / WTM / demo / WalkingTec.Mvvm.ApiDemo / ClientApp / src / app / index.js View on Github external
RootRoutes.prototype.renderApp = function () {
        if (Store.User.isLogin) {
            console.log("-----------路由列表-----------", lodash.find(this.routes, function (x) { return x.path == "/"; }).routes);
            return React.createElement(LocaleProvider, { locale: zhCN },
                React.createElement(React.Fragment, null, renderRoutes(this.routes)));
        }
        return React.createElement(Login, null);
    };
    RootRoutes.prototype.render = function () {
github art-software / art-core / packages / art-demo-ssr / client / product / view / IndexSSR.tsx View on Github external
public render() {
    const { url } = (this.props as any).data;
    console.log('url: ', url);
    const routeConfig = convertCustomRouteConfig(routes);
    console.log('routeConfig: ', routeConfig);
    return (
      
        {
          renderRoutes(routeConfig)
        }
      
    );
  }
}
github alexolefirenko / react-admin-ui / react-admin-ui / src / components / Layout.jsx View on Github external
render() {
        return (
            
                <header>
                
                
                
                    
                        {renderRoutes(this.props.route.routes)}
                    
                
                
                
            
        )
    }
}</header>
github kimkwanka / niru / client / components / App / App.jsx View on Github external
export const App = () =&gt; (
  <div>
    
    <header>
    <main>
      {renderRoutes(routes)}
    </main>
    <footer>
  </footer></header></div>
);
github timberio / gitdocs / src / bundler / static.js View on Github external
export async function renderTree (props) {
  const app = (
    
      
        {renderRoutes(props.tree)}
      
    
  )

  return {
    rendered: renderToString(app),
    helmet: helmet.renderStatic(),
  }
}
github bs32g1038 / node-blog / admin / src / layouts / PageView.js View on Github external
render() {
        const {
            route: { routes },
        } = this.props;

        return renderRoutes(routes);
    }
}
github mozilla / delivery-console / src / components / Routes.js View on Github external
render() {
    return renderRoutes(applicationRoutes);
  }
}
github damassi / isomorphic-relay-app / relay-modern / src / apps / artworks / components / Layout.js View on Github external
export function Layout(props) {
  return (
    <div>
      <nav>
      <div>
        <h3>Isomorphic React / Relay Modern / React Router App</h3>
        <div>{renderRoutes(props.route.routes, props)}</div>
      </div>
    </nav></div>
  )
}
github ericmasiello / isomorphic-typescript-react-redux-starter / src / client / client.tsx View on Github external
import createStore from '../helpers/createStore';

const axiosInstance = axios.create({
  baseURL: '/api',
});

const store = createStore(
  axiosInstance,
  window.INITIAL_STATE,
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,
);

export const client = (
  
    
      <div>{renderRoutes(Routes)}</div>
    
  
);

ReactDOM.hydrate(
  client,
  document.querySelector('#root'),
);
github BenMagyar / later.js / src / render.js View on Github external
.then(() =&gt; {
      renderMethod = renderMethod || renderToString;
      const content = renderMethod(
        
          
            
              {renderRoutes(routes)}
            
          
        
      );
      if (context.url) {
        res.redirect(301, context.url);
      } else {
        const helmet = Helmet.renderStatic();
        const page = renderToString(
          
        );

react-router-config

Static route config matching for React Router

MIT
Latest version published 5 years ago

Package Health Score

80 / 100
Full package analysis