Skip to content

Commit 58887dc

Browse files
committed
update deps and docs
1 parent 5f6157d commit 58887dc

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

README.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,7 @@ const ColoredRect = () => {
4646
setColor(Konva.Util.getRandomColor());
4747
};
4848

49-
return (
50-
<Rect
51-
x={20}
52-
y={20}
53-
width={50}
54-
height={50}
55-
fill={color}
56-
shadowBlur={5}
57-
onClick={handleClick}
58-
/>
59-
);
49+
return <Rect x={20} y={20} width={50} height={50} fill={color} shadowBlur={5} onClick={handleClick} />;
6050
};
6151

6252
const App = () => {
@@ -166,6 +156,10 @@ Demo: [https://codesandbox.io/s/6l97wny44z](https://codesandbox.io/s/6l97wny44z)
166156

167157
## Usage with Next.js
168158

159+
**From `[email protected]`, you don't need to do any extra steps. It will work out-of-the-box.**
160+
161+
If you use konva verion <= 9, continue reading.
162+
169163
Note: `react-konva` is designed to work in the client-side. On the server side, it will render just empty div. So it doesn't make much sense to use react-konva for server-side rendering. In Next.js you may have issue like
170164

171165
> Module not found: Can't resolve 'canvas'
@@ -282,9 +276,7 @@ const ThemeContext = React.createContext('red');
282276

283277
const ThemedRect = () => {
284278
const value = React.useContext(ThemeContext);
285-
return (
286-
<Rect x={20} y={50} width={100} height={100} fill={value} shadowBlur={10} />
287-
);
279+
return <Rect x={20} y={50} width={100} height={100} fill={value} shadowBlur={10} />;
288280
};
289281

290282
const Canvas = () => {

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@
4747
"devDependencies": {
4848
"@types/chai": "^5.2.2",
4949
"@types/mocha": "^10.0.10",
50-
"@types/react": "19.1.8",
50+
"@types/react": "19.1.10",
5151
"assert": "^2.1.0",
52-
"chai": "5.2.0",
53-
"konva": "^9.3.20",
52+
"chai": "5.2.1",
53+
"konva": "^9.3.22",
5454
"mocha-headless-chrome": "^4.0.0",
55-
"parcel": "^2.15.2",
55+
"parcel": "^2.15.4",
5656
"process": "^0.11.10",
57-
"react": "^19.1.0",
58-
"react-dom": "^19.1.0",
59-
"sinon": "^20.0.0",
57+
"react": "^19.1.1",
58+
"react-dom": "^19.1.1",
59+
"sinon": "^21.0.0",
6060
"timers-browserify": "^2.0.12",
61-
"typescript": "^5.8.3",
61+
"typescript": "^5.9.2",
6262
"use-image": "^1.1.4",
6363
"util": "^0.12.5"
6464
},

0 commit comments

Comments
 (0)