Unverified Commit 57489158 authored by Callum Gare's avatar Callum Gare Committed by GitHub

Add `onLoad` gottcha note to `next/script` docs (#33097)

Add a note to the onLoad section of the next/script documentation clarifying that onLoad will not run if `strategy="beforeInteractive"`. (That tripped me up for a bit so I thought I'd update the docs to save any one else the hassle :).)
Co-authored-by: 's avatarLee Robinson <9113740+leerob@users.noreply.github.com>
parent 613e4c91
......@@ -46,6 +46,8 @@ The loading strategy of the script.
A method that returns additional JavaScript that should be executed after the script has finished loading.
> **Note: `onLoad` can't be used with the `beforeInteractive` loading strategy.**
The following is an example of how to use the `onLoad` property:
```jsx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment