Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSGJ committed Mar 19, 2024
1 parent 76d89e5 commit 6196484
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions JSR.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,30 @@ export default function MyApp({ Component, pageProps }) {
}
```

### Usage with React, Vite React or any other React based component

For rendering add `<NextTopLoader />` to your `return()` inside the <Router><Router/> component in `App()`:

```js
import NextTopLoader from 'nextjs-toploader';
const App = () => {
return (
<div>
<Router>
<NextTopLoader color='red' showSpinner={false} />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="*" element={<NotFound/>} />
</Routes>
</Router>
</div>
)
}

export default App;
```

### Default Configuration

If no props are passed to `<NextTopLoader />`, below is the default configuration applied.
Expand Down

0 comments on commit 6196484

Please sign in to comment.