Skip to content

Commit dffff52

Browse files
veritemmachour
andauthored
fix(nprogress): useNavigation instead of useTransition
Co-authored-by: Mehdi Achour <[email protected]>
1 parent ae0bc39 commit dffff52

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nprogress/app/root.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
Outlet,
77
Scripts,
88
ScrollRestoration,
9-
useTransition,
9+
useNavigation,
1010
} from "@remix-run/react";
1111
import NProgress from "nprogress";
1212
import nProgressStyles from "nprogress/nprogress.css";
@@ -24,7 +24,7 @@ export const meta: MetaFunction = () => ({
2424
});
2525

2626
export default function App() {
27-
const transition = useTransition();
27+
const transition = useNavigation();
2828
useEffect(() => {
2929
// when the state is idle then we can to complete the progress bar
3030
if (transition.state === "idle") NProgress.done();

nprogress/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"@remix-run/dev": "^1.19.3",
2121
"@remix-run/eslint-config": "^1.19.3",
2222
"@types/nprogress": "^0.2.0",
23-
"@types/react": "^18.0.25",
24-
"@types/react-dom": "^18.0.8",
25-
"eslint": "^8.27.0",
26-
"typescript": "^4.8.4"
23+
"@types/react": "^18.0.34",
24+
"@types/react-dom": "^18.0.11",
25+
"eslint": "^8.38.0",
26+
"typescript": "^5.0.4"
2727
},
2828
"engines": {
2929
"node": ">=14.0.0"

0 commit comments

Comments
 (0)