Я создаю приложение React Typescript и использую CKEditor, метод дает мне этот объект:
![enter image description here](https://i.stack.imgur.com/3vkUA.png)
И когда я пытаюсь отрендерить его, это дает мне эту ошибку:
![enter image description here](https://i.stack.imgur.com/TlXZP.png)
Может кто-нибудь объяснить мне, что я делаю не так?
Вот код:
export default class Toolbar extends React.Component<IProps, IState> {
public toolbar: ToolbarView | undefined
public componentDidMount() {
this.toolbar = new ToolbarView()
this.toolbar.render()
console.log(this.toolbar.element) // the result is the first screenshot
}
public render() {
return this.toolbar ? this.toolbar.element : null
}
}