You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 or afterInteractive as a loading strategy, you can execute code after it has loaded using the onLoad property
Note: onLoad can't be used with the beforeInteractive 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.
Changing the paragraph to not include `beforeInteractive` as one of the possible use cases of `onLoad`.
*Update:* Added docs for `onError` in the API reference of `next/script`.
@housseindjirdeh does `onError` also has the same limitation or is this only for `onLoad`?
Closes#33402
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Documentation / Examples
- [x] Make sure the linting passes by running `yarn lint`
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
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:
However, in the API reference page on
next/script
, underonLoad
, it says:As far as I know, the
onLoad
prop forbeforeInteractive
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
The text was updated successfully, but these errors were encountered: