Skip to content

Commit

Permalink
Post Editor: Disable React strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored and jsnajdr committed Dec 19, 2022
1 parent 8ba6f59 commit f0b536f
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions packages/edit-post/src/editor.js
Expand Up @@ -14,7 +14,7 @@ import {
PostLockedModal,
store as editorStore,
} from '@wordpress/editor';
import { StrictMode, useMemo } from '@wordpress/element';
import { useMemo } from '@wordpress/element';
import { SlotFillProvider } from '@wordpress/components';
import { store as coreStore } from '@wordpress/core-data';
import { ShortcutProvider } from '@wordpress/keyboard-shortcuts';
Expand Down Expand Up @@ -182,28 +182,24 @@ function Editor( {
}

return (
<StrictMode>
<ShortcutProvider>
<SlotFillProvider>
<EditorProvider
settings={ editorSettings }
post={ post }
initialEdits={ initialEdits }
useSubRegistry={ false }
__unstableTemplate={
isTemplateMode ? template : undefined
}
{ ...props }
>
<ErrorBoundary onError={ onError }>
<EditorInitialization postId={ postId } />
<Layout styles={ styles } />
</ErrorBoundary>
<PostLockedModal />
</EditorProvider>
</SlotFillProvider>
</ShortcutProvider>
</StrictMode>
<ShortcutProvider>
<SlotFillProvider>
<EditorProvider
settings={ editorSettings }
post={ post }
initialEdits={ initialEdits }
useSubRegistry={ false }
__unstableTemplate={ isTemplateMode ? template : undefined }
{ ...props }
>
<ErrorBoundary onError={ onError }>
<EditorInitialization postId={ postId } />
<Layout styles={ styles } />
</ErrorBoundary>
<PostLockedModal />
</EditorProvider>
</SlotFillProvider>
</ShortcutProvider>
);
}

Expand Down

1 comment on commit f0b536f

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3729912398
📝 Reported issues:

Please sign in to comment.