Proper way to use useSelect

I am concerned the implementation is incorrect

If you just wanted to know whether you have correctly used useSelect, then yes, you have — and I would also return the same object as returned by your callback.

However, instead of const imageSizes = useSelect( ... ), I’d just do const { image, imageSizes } = useSelect( ... ), i.e. unpack the properties, and then I would not need the const { image } = imageSizes; and I also would just use imageSizes instead of imageSizes.imageSizes.

But that’s just my personal preference, and one reason is because unpacking would make the code less.

tech