Script loading for Next.js applications with React Server Components
ServerTag
component in your Next.js pages or layouts:
Prop | Type | Default | Description |
---|---|---|---|
remoteUrl | string | Required | The URL to fetch script URLs from |
cacheInterval | number | 300 | Cache duration in seconds |
renderScript | function | undefined | Custom script rendering function |