profile
viewpoint

Ask questionsInvalid hook call error when use package as dependency with npm link

There is such error when add this package to another package:

The above error occurred in the <MediaQueryContextConsumer> component:
    in MediaQueryContextConsumer
    in s
    in div
    in t (at App.js:12)
    in div (at App.js:11)
    in App (at src/index.js:7)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
contra/react-responsive

Answer questions contra

Hi @JuliaAlaeva -

The hooks PR is not published, and we don't answer tickets for WIP code. You can follow the PR here: https://github.com/contra/react-responsive/pull/210

useful!
source:https://uonfu.com/
answerer
contra contra @staeco Phoenix, AZ https://contra.io Engineer/founder - @staeco • @gulpjs • @wearefractal • @genomejs + more
Github User Rank List