We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version 2.10.0 uses useInsertionEffect, which is not available in React 17. It breaks the build:
useInsertionEffect
ERROR in ./node_modules/wouter/react-deps.js 46:2-27 export 'useInsertionEffect' (imported as 'useBuiltinInsertionEffect') 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)
ERROR in ./node_modules/wouter/react-deps.js 46:2-27
export 'useInsertionEffect' (imported as 'useBuiltinInsertionEffect') 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)
In the error webpack can't find export, which is correct, since React 17 doesn't have this hook.
The text was updated successfully, but these errors were encountered:
You can go back to v2.9.x first. maybe should add some description about it in readme
readme
Sorry, something went wrong.
I believe this can be fixed simply by changing
import { useEffect, useLayoutEffect, useRef, useInsertionEffect as useBuiltinInsertionEffect, } from "react";
to:
import * as React from "react"; const {useEffect, useLayoutEffect, useRef, useInsertionEffect: useBuiltinInsertionEffect} = React;
The intention was for useInsertionEffect to be undefined on React 17, not throw an error. (And if so, use useLayoutEffect instead).
undefined
useLayoutEffect
Thank you for reporting this. Has been fixed in v2.10.1 f9333dc
No branches or pull requests
Version 2.10.0 uses
useInsertionEffect
, which is not available in React 17. It breaks the build:In the error webpack can't find export, which is correct, since React 17 doesn't have this hook.
The text was updated successfully, but these errors were encountered: