Skip to content

Commit

Permalink
add error on incorrect React version
Browse files Browse the repository at this point in the history
  • Loading branch information
lavrton committed Jan 8, 2025
1 parent b6c35ba commit 76dd3ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ReactKonvaCore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
'use strict';

import React from 'react';

if (React.version.indexOf('19') === -1) {
throw new Error(
'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.'
);
}

import Konva from 'konva/lib/Core.js';
import type { Stage as KonvaStage } from 'konva/lib/Stage.js';
import ReactFiberReconciler, {
Expand Down

0 comments on commit 76dd3ba

Please sign in to comment.