-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Description
What is the improvement or update you wish to see?
I'm afraid there's currently a conflict between the two documentation pages on next/script. The Script Component page says following:
If you are loading a script with either
beforeInteractive
orafterInteractive
as a loading strategy, you can execute code after it has loaded using theonLoad
property
However, in the API reference page on next/script
, under onLoad
, it says:
Note:
onLoad
can't be used with thebeforeInteractive
loading strategy.
As far as I know, the onLoad
prop for beforeInteractive
is not currently working and there's an open issue on that. Either way, the documentation should be in line with the current state of affairs.
Is there any context that might help us understand?
I can see the reason why a separate API documentation page for next/script exists in addition to the guide page on script optimization, but I would hope that any time either of those two are updated, the other would be checked for inconsistencies.
The inconsistency was created in #33097.
Does the docs page already exist? Please link to it.
No response