Skip to content

Commit b29182c

Browse files
authored
Add onLoad gottcha note to next/script doco
Add a note to the onLoad section of the next/script documenation clarifying that onLoad will not run if `strategy="beforeInteractive"`.
1 parent 3861e4b commit b29182c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api-reference/next/script.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ The loading strategy of the script.
4646

4747
A method that returns additional JavaScript that should be executed after the script has finished loading.
4848

49+
> **Note: onLoad will not fire if the `strategy` prop is set to `beforeInteractive`.**
50+
4951
The following is an example of how to use the `onLoad` property:
5052

5153
```jsx

0 commit comments

Comments
 (0)