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 Jan 5, 2023
1 parent 3bcaaa5 commit 6946ed0
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions packages/edit-post/src/editor.js
Original file line number Diff line number Diff line change
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 6946ed0

@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/3847733122
📝 Reported issues:

Please sign in to comment.