Skip to content

Conversation

@sergeystoma
Copy link

Related to #3

@iapain
Copy link
Member

iapain commented Feb 17, 2021

@shardiwal Could you please verify this PR?

this.state = { isOpen : false };
this.handleToggle = this.handleToggle.bind(this);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per React method componentWillReceiveProps are considered legacy and advised to avoid them in new code. And that name will continue to work until version 17 only.

@iapain What's your suggestion here ?

@JoshuaJWayne
Copy link

@sergeystoma Thank you for this patch it fixed the issue I was having perfectly.

@iapain iapain mentioned this pull request Aug 21, 2021
@wrrwrr111 wrrwrr111 mentioned this pull request Sep 10, 2021
@wrrwrr111
Copy link

can use componentDidUpdate

componentDidUpdate(prevProps, prevState, snapshot) {
    if (this.props.value !== prevProps.value && prevProps.value == null) {
      const editor = this.editorRef.current.getInstance();
      editor.setMarkdown(this.props.value, false);
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants