DocsAPIrendererRouter

Router

Manages the application routes in the renderer process.

The Router component returned by the createElectronRouter function is responsible for managing the routes from the corresponding windows in the renderer process.

Internally, it uses the RouterProvider and the createHashRouter function from the react-router-dom package and applies the necessary logic for the corresponding windows to be displayed correctly.

Basic example

  <Router
    main={
      <Route path="/" element={<Layout />} errorElement={<ErrorScreen />}>
        <Route
          path="/"
          element={<MainScreen />}
        />
 
        <Route path="/about" element={<AboutScreen />} />
      </Route>
    }
  />

API Reference

PropertyType

[id]

Route

_providerProps?

object