How to use the @marionebl/react-router.run function in @marionebl/react-router

To help you get started, we’ve selected a few @marionebl/react-router 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 patternplate / patternplate / packages / client / src / app / entry.js View on Github external
return new Promise(resolve => {
    const eventEmitter = new EventEmitter();

    Router.run(getRoutes(), path, (Handler, state) => {
      const appData = { ...data, ...state, eventEmitter, base: "/" };
      resolve(ReactDOMServer.renderToString());
    });
  });
}

@marionebl/react-router

A complete routing library for React

MIT
Latest version published 6 years ago

Package Health Score

69 / 100
Full package analysis