🛣️React Router

How to use Rango Widget with React Router?

In case React Router is being used in your project, the following code snippet can be used to integrate Rango Widget.

import React from 'react';
import { Route, Routes } from 'react-router-dom';
import { Widget } from '@rango-dev/widget-embedded';

export function App() {
  return (
    <Routes>
      <Route path="/custom-url/*" element={<Widget config={config} />} />
    </Routes>
  );
}

Alternatively, if React Router is not being utilized, Rango Widget functions seamlessly with its integrated memory router.

Last updated