-
Notifications
You must be signed in to change notification settings - Fork 5
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
Pitfalls working with @wordpress/data, useSelect and useDispatch and how to avoid those. #190
Comments
Looking forward to start working on the article! 🚀 |
wonderful. Just assigned the topic to you, Jarda! |
Here's a draft of the article available for comments: https://docs.google.com/document/d/1gTuFwR0O2P4s8KZQ0VNy9tkVwhT1YBptL2WlLr0S-bM/edit |
This is a great article @jsnajdr! I've left some comments/thoughts and am happy to discuss! |
This is now a draft post in WordPress: https://developer.wordpress.org/news/?p=3015&preview=1&_ppp=bad243e253 |
Hi @jsnajdr here is the Pre-publishing checklist: (updated 1/29/2024)
Post-publishing checklist
|
Social copy:
|
I know this has already been reviewed, and we're close to publishing. But I just did a quick run-through the article, and something stood out to me as missing. When or why should I (as the reader) use the |
I added a sentence to the opening paragraph that describes where and why the hook is used -- in the UI components of the block editor and of custom blocks. That should make the article start less abruptly, and should give you some picture whether this is an area of WordPress development that you are interested in. |
Published 🙌 How to work effectively with the useSelect hook |
scheduled for April 22 |
Discussed in #184
Originally posted by bph December 14, 2023
This post would be an updated rewrite of Jarda Snajdr post on his personal blog two years ago.0
adding a few more practices and patterns that address problems that Jarda witnessed causing performance issues recently.
The useSelect hook implementation itself has also evolved significantly in the last year or so, having been rewritten to use React 18’s useSyncExternalStore, and adding optimizations like granular subscriptions to individual stores or conditional “lazy” subscriptions.
It would be for a reader who is already familiar with @wordpress/data and useSelect and useDispatch, uses them successfully to write a custom block or plugin, but wants to improve their game and to learn more details.
Note: Discussion title is a work in progress... it will be fixed in review process.
The text was updated successfully, but these errors were encountered: