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
{{ message }}
Repository navigation
ContentPicker SortableList logs a useSelect unstable value warning #421
When the editor runs with SCRIPT_DEBUG set to true, ContentPicker logs this warning after the picked items load:
The `useSelect` hook returns different values when called with the same state and parameters.
This can lead to unnecessary re-renders and performance issues if not fixed.
The useSelect selector in components/content-picker/SortableList.tsx causes the warning:
The selector builds a new item object for each picked item on each call (posts.reduce(...)).
The selector passes a new { _fields, context } query object to getEntityRecord on each call. With _fields in the query, getEntityRecord returns a filtered copy of the record. The selector cache uses the query object as a key, so a new query object gives a new copy.
Steps to Reproduce
Set globalThis.SCRIPT_DEBUG to true. useSelect checks for unstable return values only in this mode.
Put two records in the core store, for example two users.
Render SortableList with mode="user" and the two users as posts.
The useSelect warning shows in the console. The non-equal value keys are the uuid values of the picked items.
Expected behavior
The selector returns stable values, and ContentPicker logs no useSelect warning.
Activity
s3rgiosan commentedon Nov 14, 2026
@fabiankaegy for visibility