Not really a bug bu I have code in my studio based on https://www.sanity.io/docs/studio-react-hooks#7a5503c777f4:
import {useMemoObservable} from 'react-rx'
export function MyComponent() {
const docId = useFormValue(['_id'])
const documentStore = useDocumentStore();
const results = useMemoObservable(() => {
return documentStore.listenQuery(
`*[_type == 'article' && references($currentDoc) && !(_id in path("drafts.**"))]`,
{currentDoc: docId},
{}
)
}, [documentStore, docId])
return (
/** Render component */
)
}
Latest sanity comes with react-rx 3.0.0 which removes useMemoObersable but does not advice , any recommendation? The documentation should be updated too. Thanks!