Stage
をReact-Konvaでレンダリングしようとすると、最近次のエラーが表示されています。Cannot read property 'getPooled' of null at Object.componentDidMount
現在、私はKonvaを使って何もレンダリングできませんでした。私はtypescriptとwebpackと反応konvaを使用しています。 次は私の単純化されたコードです: 私は var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();
反応-konvaをソースコードにこの行に問題を突き止めましたReact-Konvaでコンテンツをレンダリングできません
import * as React from "react";
import * as ReactDOM from 'react-dom';
import { Layer, Stage, Rect, Group } from 'react-konva';
class Demo extends React.Component {
public render(): JSX.Element {
return (
<div style={{flex: 5}}>
<Stage width={320} height={320} style={{width: '100%', height: '100%'}}>
<Layer>
<Rect
height={32}
width={32}
x={0}
y={0}
fill={'#bb66bb'}
/>
</Layer>
</Stage>
</div>
);
}
}
:
.jsxの私はReactUpdates
(これはreact-dom
の一部です)の次のコードをトレースしています。
var ReactUpdates = {
/**
* React references `ReactReconcileTransaction` using this property in order
* to allow dependency injection.
*
* @internal
*/
ReactReconcileTransaction: null,
...ommitted code here for brevity
};
module.exports = ReactUpdates;
明らかに、参照プロパティがreact-konva
は、このプロパティを参照している理由は...私は本当に、理解していないnull
に設定されているか、私は誤読していた場合に何が起こっていますか。何か案は? (また、v. 1.1.4 of react-konva
とv. 15.5.4 of react-dom
を使用しています)
溶液を送るための乾杯。 –