You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
-
# Remix TopLoader
1
+
# Remix / React Router TopLoader
2
2
3
-
- A Remix Top Loading bar Component **heavily** inspired by [Next.js TopLoader](https://github.com/TheSGJ/nextjs-toploader). Based on [NProgress](https://www.npmjs.com/package/nprogress)
3
+
- A Remix and React Router Top Loading bar Component **heavily** inspired by [Next.js TopLoader](https://github.com/TheSGJ/nextjs-toploader). Based on [NProgress](https://www.npmjs.com/package/nprogress)
4
4
5
5
> :exclamation: This is my first package. Contributions are welcomed 👍
6
6
7
-

8
-
7
+

9
8
10
9
## Install
11
10
@@ -32,14 +31,18 @@ pnpm add remix-toploader
32
31
import using:
33
32
34
33
```js
34
+
// in Remix v2
35
35
importRemixTopLoaderfrom"remix-toploader";
36
+
// or
37
+
import { RemixTopLoader } from"remix-toploader";
38
+
39
+
// in React Router v7
40
+
import { RouterTopLoader } from"remix-toploader";
36
41
```
37
42
38
-
Navide to `root.tsx` of your app and add `<RemixTopLoader />` to the `<body>` tag.
43
+
Navigate to `root.tsx` of your app and add `<RemixTopLoader />` to the `<body>` tag.
39
44
40
45
```js
41
-
importRemixTopLoaderfrom"remix-toploader";
42
-
43
46
exportfunctionLayout({ children }) {
44
47
return (
45
48
<html lang="en">
@@ -50,7 +53,10 @@ export function Layout({ children }) {
0 commit comments