Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update doc #74

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading