We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73e8836 commit c5467c9Copy full SHA for c5467c9
packages/edit-site/src/components/editor/index.js
@@ -164,6 +164,15 @@ export default function Editor() {
164
useEffect( () => {
165
if ( ! hasResolvingSelectors && ! loaded ) {
166
clearTimeout( timeoutRef.current );
167
+
168
+ /*
169
+ * We're using an arbitrary 1s timeout here to catch brief moments
170
+ * without any resolving selectors that would result in displaying
171
+ * brief flickers of loading state and loaded state.
172
+ *
173
+ * It's worth experimenting with different values, since this also
174
+ * adds 1s of artificial delay after loading has finished.
175
+ */
176
timeoutRef.current = setTimeout( () => {
177
setLoaded( true );
178
}, 1000 );
0 commit comments