-
-
Notifications
You must be signed in to change notification settings - Fork 118
Closed
Description
Hi, does Signal not work with Routes from react-router-dom.
I notice every time I include the import Signal statement (import { useSignal } from '@preact/signals-react';) in a component file where I use Routes. It will throw the error below:
Uncaught Error: [Route] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>
import React, { Suspense } from 'react';
import Box1 from './Box1';
import {
Route, Navigate, Routes,
} from 'react-router-dom';
const SignalsPattern = () => (
<Routes>
<Route
path='/procedure'
element={(
<Suspense fallback=''>
<Box1 />
</Suspense>
)}
/>
</Routes>
);
Metadata
Metadata
Assignees
Labels
No labels
