Skip to content

Bug: "Should have a queue. This is likely a bug in React" #30038

Closed as not planned
@Nantris

Description

@Nantris

React version: 18.2.0

(18.2.0 is required by Expo, but theoretically equivalent to 18.3.1 for this purpose)

Steps To Reproduce

  1. Unknown. No rules of hooks are being broken and the error stack is not helpful for diagnosis.

Code example:

I don't know how to reproduce this. Originally I faced #22049, supposedly caused by our "problem hook":

// Supposed problem hook
const linkableRef = useRef(linkable);
useEffect(() => {
  linkableRef.current = linkable; // linkable is an array of objects
  const { current: editor } = editorRef;
  if (editor) editor.commands.updateLinkable();
}, [linkable, editorRef]);

and removing the hook causes this instead: Error: Should have a queue. This is likely a bug in React. Please file an issue.

The current behavior

Using our simple hook causes #22049 - and removing our hook causes this issue instead

The expected behavior

Using React as specified in the docs causes no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions