Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly using useIntersectionEffect on React 17 #2650

Closed
kokarn opened this issue Feb 19, 2022 · 1 comment
Closed

Incorrectly using useIntersectionEffect on React 17 #2650

kokarn opened this issue Feb 19, 2022 · 1 comment

Comments

@kokarn
Copy link

kokarn commented Feb 19, 2022

Current behavior:

It's trying to use the useIntersectionEffect even when it's not available.

To reproduce:

My only change was to run npm update in my current project and it now gives the below warning:

ERROR in ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js 95:48-68
export 'useInsertionEffect' (imported as 'useInsertionEffect$1') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version)

Expected behavior:

It shouldn't use useIntersectionEffect on React 17 if my understanding of that hook is correct.

Environment information:

  • react version: 17.0.2
  • @emotion/react version: 11.8.0

Posting ASAP as this seems like it would affect a lot of people. Working on a working codesandbox.

@kokarn
Copy link
Author

kokarn commented Feb 19, 2022

Duplicate of #2649

@kokarn kokarn closed this as completed Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant