Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Conversation

@benatkin
Copy link
Contributor

In the React hooks example, EditorState.createEmpty will be called each time the component is rendered. By wrapping it in a function, it will only be called once per instance of the MyEditor component.

In the React hooks example, EditorState.createEmpty will be called each time the component is rendered. By wrapping it in a function, it will only be called once per instance of the MyEditor component.
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mrkev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@mrkev merged this pull request in 05e838e.

vilemj-Viclick pushed a commit to kontent-ai/draft-js that referenced this pull request Jul 16, 2020
…e#2432)

Summary:
In the React hooks example, `EditorState.createEmpty` will be called each time the component is rendered. By wrapping it in a function, it will only be called once per instance of the MyEditor component.
Pull Request resolved: facebookarchive#2432

Reviewed By: claudiopro

Differential Revision: D21652207

Pulled By: mrkev

fbshipit-source-id: 0c24a4e84718227b4e89d1c810b2558ffd51384d
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
In the React hooks example, `EditorState.createEmpty` will be called each time the component is rendered. By wrapping it in a function, it will only be called once per instance of the MyEditor component.
Pull Request resolved: facebookarchive/draft-js#2432

Reviewed By: claudiopro

Differential Revision: D21652207

Pulled By: mrkev

fbshipit-source-id: 0c24a4e84718227b4e89d1c810b2558ffd51384d
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants