> ## Documentation Index
> Fetch the complete documentation index at: https://help.revenuehero.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to install the scheduler script?

> How to set up the booking widget on a React page.

**Install the scheduler on a page built on NextJS**

If your page uses NextJS, the following snippet needs to be added

```
import Script from 'next/script'
	export const RHScheduler = ({ routerId, formId }): JSX.Element => {
		useEffect(() => {
			<Script
			  src="https://app.revenuehero.io/scheduler.min.js"
			  strategy="afterInteractive"
			  onLoad={() => {
			    const hero = new window.RevenueHero({ routerId: routerId })
			    hero.schedule(formId)
			  }}
			/>
		}, [])
	}
```

You're all set!

***
