-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds deprecation notice to useApiFetch
hook
#21723
Conversation
Size Change: -32 B (0%) Total Size: 842 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well for me and I'm able to see the deprecation notice in my console. It's incredibly long which might actually make it hard to observe but that has nothing to do with this usage.
Regarding the general direction to deprecate this feature, I'm deferring to the discussion in #21674 which looks like this approach is a go.
242e353
to
c8d95dd
Compare
@aduth if you find time to review this please note:
|
Gutenberg follows WordPress's versioning conventions. There will be no 7.11.0. 8.0.0 comes after 7.9.0, so 8.1.0 would be the correct removal version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build failure is likely because package-lock.json
should be updated as a result of the change to the nested package.json
(I believe it should be expected a one-line change, an addition of the package to requires
section). Otherwise this looks good.
This PR has been extracted from #21674.
As per [advice here from @aduth](See #21674 (comment)) this PR adds a deprecation notice to
useApiFetch
.The work to remove this hook from usage within the Core Navigation Block is handled in a separate PR.
Description
Adds a deprecation warning to the
useApiFetch
hook within@wordpress/api-fetch
.Questions
How has this been tested?
npm install && npm run dev
console
drawer.useApiFetch
hook.Please note: the work to remove this hook from usage within the Core Navigation Block is handled in a separate PR.
Screenshots
Types of changes
Checklist: