### What version of React Router are you using? 6.4.3 ### Steps to Reproduce ```typescript export default function MyPage() { return undefined; } const router = createBrowserRouter(createRoutesFromElements( <> <Route path="/" element={ <MyPage /> } /> </> )); ``` ### Expected Behavior As of React 18, a component can return `undefined` instead of null. See official [PR](https://github.com/facebook/react/pull/21869) and [write-up](https://github.com/reactwg/react-18/discussions/75). At the moment, the TS typings for the `Route` component in react-router do not accept passing an element that returns `undefined`, only null. ### Actual Behavior > Type 'undefined' is not assignable to type 'Element | null'.ts(2786)