Skip to content

Commit 76dd3ba

Browse files
committedJan 8, 2025
add error on incorrect React version
1 parent b6c35ba commit 76dd3ba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/ReactKonvaCore.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
'use strict';
99

1010
import React from 'react';
11+
12+
if (React.version.indexOf('19') === -1) {
13+
throw new Error(
14+
'react-konva version 19 is only compatible with React 19. Make sure to have the last version of react-konva and react or downgrade react-konva to version 18.'
15+
);
16+
}
17+
1118
import Konva from 'konva/lib/Core.js';
1219
import type { Stage as KonvaStage } from 'konva/lib/Stage.js';
1320
import ReactFiberReconciler, {

0 commit comments

Comments
 (0)
Please sign in to comment.