Skip to content

React has detected a change in the order of Hooks called by SpaceInternal #37

Closed
@thekapadia

Description

@thekapadia

@aeagle I get this error on the console when I change the zIndex programmatically.

Warning: React has detected a change in the order of Hooks called by SpaceInternal. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
1. useRef                     useRef
2. useState                   useState
3. useRef                     useRef
4. useRef                     useRef
5. useEffect                  useEffect
6. useEffect                  useEffect
7. useEffect                  useEffect
8. useContext                 useContext
9. undefined                  useContext

Activity

aeagle

aeagle commented on Oct 20, 2019

@aeagle
Owner

@thekapadia I believe I have resolved the issue in version 0.1.18. I was using a hook within a conditional expression.

thekapadia

thekapadia commented on Oct 22, 2019

@thekapadia
Author

@aeagle Yes, this error does not occur in 0.1.18. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aeagle@thekapadia

        Issue actions

          React has detected a change in the order of Hooks called by SpaceInternal · Issue #37 · aeagle/react-spaces