File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,30 @@ export default function MyApp({ Component, pageProps }) {
71
71
}
72
72
```
73
73
74
+ ### Usage with React, Vite React or any other React based component
75
+
76
+ For rendering add ` <NextTopLoader /> ` to your ` return() ` inside the <Router ><Router /> component in ` App() ` :
77
+
78
+ ``` js
79
+ import NextTopLoader from ' nextjs-toploader' ;
80
+ const App = () => {
81
+ return (
82
+ < div>
83
+ < Router>
84
+ < NextTopLoader color= ' red' showSpinner= {false } / >
85
+ < Routes>
86
+ < Route path= " /" element= {< Home / > } / >
87
+ < Route path= " /about" element= {< About / > } / >
88
+ < Route path= " *" element= {< NotFound/ > } / >
89
+ < / Routes>
90
+ < / Router>
91
+ < / div>
92
+ )
93
+ }
94
+
95
+ export default App ;
96
+ ```
97
+
74
98
### Default Configuration
75
99
76
100
If no props are passed to ` <NextTopLoader /> ` , below is the default configuration applied.
You can’t perform that action at this time.
0 commit comments