konvajs / react-konva

React + Canvas = Love. JavaScript library for drawing complex canvas graphics using React.
https://konvajs.github.io/docs/react/
MIT License
5.75k stars 256 forks source link

export 'useId' (imported as 'React') was not found in 'react' #781

Closed GuyoST closed 11 months ago

GuyoST commented 11 months ago

Hello every one,

I just installed konva and react-konva to my project but I get this :

Compiled with problems:

ERROR in ./node_modules/react-konva/node_modules/its-fine/dist/index.js 83:13-24

export 'useId' (imported as 'React') 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)

Is there anything special for make it work ? My code was very simple 👍

just a component returning this :

import { Stage, Layer, Rect, Text } from 'react-konva';
...
<Stage width={window.innerWidth} height={window.innerHeight}>
    <Layer>

    </Layer>
</Stage>

thank you :)

lavrton commented 11 months ago

Update react and react-dom to the last version.

lush-99 commented 9 months ago

Update react and react-dom to the last version.

which konca version can used in react16?

lavrton commented 9 months ago

react-konva@16.13.0-6 may work