Skip to content

Commit 8b6fce9

Browse files
committed
Merge remote-tracking branch 'origin/main' into examples/remix-rr-7
2 parents 4a0a26a + 6ee78e6 commit 8b6fce9

File tree

7 files changed

+50
-41
lines changed

7 files changed

+50
-41
lines changed

docs/ProjectTemplates.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ A curated list of minimal project templates and examples to get started using UI
9898
>
9999
<ul>
100100
<li>
101-
<LabelWithWrapping>
102-
Routing and Data Fetching using the <code>createBrowserRouter</code> of React Router
103-
</LabelWithWrapping>
101+
<LabelWithWrapping>{`Routing and Data Fetching using the createBrowserRouter of React Router v7`}</LabelWithWrapping>
104102
</li>
105103
<li>
106104
<Label>Cypress Component Test setup</Label>

examples/vite-ts/package-lock.json

Lines changed: 42 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/vite-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@ui5/webcomponents-react": "~2.5.0",
2121
"react": "^18.2.0",
2222
"react-dom": "^18.2.0",
23-
"react-router-dom": "^6.22.0"
23+
"react-router": "^7.0.2"
2424
},
2525
"devDependencies": {
2626
"@types/react": "^18.0.28",

examples/vite-ts/src/AppShell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
Title
1818
} from '@ui5/webcomponents-react';
1919
import { useRef, useState } from 'react';
20-
import { Outlet, useLocation, useMatches, useNavigate } from 'react-router-dom';
20+
import { Outlet, useLocation, useMatches, useNavigate } from 'react-router';
2121
import { SingleTodoHandle } from './main.tsx';
2222
import { Todo } from './mockImplementations/mockData.ts';
2323
import classes from './AppShell.module.css';

examples/vite-ts/src/ToDos.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BusyIndicator, Card, List, ListItemStandard } from '@ui5/webcomponents-react';
22
import { Suspense } from 'react';
3-
import { Await, useLoaderData, useNavigate } from 'react-router-dom';
3+
import { Await, useLoaderData, useNavigate } from 'react-router';
44
import { Todo } from './mockImplementations/mockData.ts';
55
import classes from './ToDos.module.css';
66

examples/vite-ts/src/TodoDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
Switch,
1010
TextArea
1111
} from '@ui5/webcomponents-react';
12-
import { useLoaderData } from 'react-router-dom';
12+
import { useLoaderData } from 'react-router';
1313
import { Todo } from './mockImplementations/mockData.ts';
1414
import classes from './TodoDetails.module.css';
1515
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';

examples/vite-ts/src/main.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import ErrorScreenIllustration from '@ui5/webcomponents-fiori/dist/illustrations
33
import { BreadcrumbsItem, IllustratedMessage, ThemeProvider } from '@ui5/webcomponents-react';
44
import { ReactNode, StrictMode } from 'react';
55
import { createRoot } from 'react-dom/client';
6-
import { createBrowserRouter, defer, LoaderFunctionArgs, RouterProvider } from 'react-router-dom';
6+
import { createBrowserRouter, LoaderFunctionArgs } from 'react-router';
7+
import { RouterProvider } from 'react-router/dom';
78
import './index.css';
89
import AppShell from './AppShell.tsx';
910
import { fetchToDos } from './mockImplementations/mockAPIs.ts';
@@ -19,7 +20,7 @@ export interface SingleTodoHandle {
1920
// To simulate a slow loader increase the `delay`, to simulate a failed request set `shouldThrow` to `true`
2021
async function toDosLoader() {
2122
const todosPromise = fetchToDos({ delay: 500, shouldThrow: false });
22-
return defer({ todos: todosPromise });
23+
return { todos: todosPromise };
2324
}
2425

2526
async function singleToDoLoader({ params }: LoaderFunctionArgs) {

0 commit comments

Comments
 (0)