diff --git a/src/app/AppContainer.js b/src/app/AppContainer.js index c94215127e..bd4e9b0919 100644 --- a/src/app/AppContainer.js +++ b/src/app/AppContainer.js @@ -26,19 +26,13 @@ type PropsType = { initialHtml: string, }; -type StateType = { - lastHtmlSent: string, -}; - -class AppContainer extends React.Component { +class AppContainer extends React.Component { constructor( props: PropsType ) { super( props ); this.parseBlocksAction( props.initialHtml ); - this.state = { - lastHtmlSent: '', - }; + this.lastHtmlSent = null; } onChange = ( clientId, attributes ) => { @@ -72,10 +66,8 @@ class AppContainer extends React.Component { serializeToNativeAction = () => { const html = serialize( this.props.blocks ); - RNReactNativeGutenbergBridge.provideToNative_Html( html, this.state.lastHtmlSent !== html ); - this.setState( { - lastHtmlSent: html, - } ); + RNReactNativeGutenbergBridge.provideToNative_Html( html, this.lastHtmlSent !== html ); + this.lastHtmlSent = html; }; mergeBlocksAction = ( blockOneClientId, blockTwoClientId ) => {