How to use the found.makeRouteConfig function in found

To help you get started, we’ve selected a few found 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 episodeyang / ml_logger / ml-dash-client / src / index.js View on Github external
import {createFarceRouter, createRender, makeRouteConfig, Route,} from 'found';
import {Resolver} from 'found-relay';
import FrontPage from './pages/FrontPage';
import Profile, {ProfileQuery, render as ProfileRender} from "./pages/Profile";
import KitchenSink from "./pages/KitchenSink";
import Dash from "./pages/Dash";
import Theme from "./Theme";
import Settings from "./pages/Settings";
import Profiles from "./pages/Profiles";
import './App.css';
import store from "./local-storage";

const Router = createFarceRouter({
  historyProtocol: new BrowserProtocol(),
  historyMiddlewares: [queryMiddleware],
  routeConfig: makeRouteConfig(
         params} query={ProfileQuery}

  render: createRender({}),

if (!store.value.profile)
github 4Catalyzer / found / types / example-app / index.tsx View on Github external
import { MainPage } from './MainPage';
import { WidgetsPage } from './WidgetsPage';

const fetchWidget = (widgetId: any) =>
  new Promise(resolve => {
    throw new Error('oops');

const fetchWidgets = ({ params, context }: RouteMatch) => [

const BrowserRouter = createBrowserRouter({
  routeConfig: makeRouteConfig(
            import('./WidgetsPage').then(module => module.WidgetsPage)
          getData={({ params: { widgetId } }) =>
            fetchWidget(widgetId).catch(() => {
              throw new HttpError(404);
          render={({ Component, props }) =>
            Component && props ? (