Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

"Error warning" with "Cannot update component while rendering a different component" on RN 0.64 #3631

Description

@hypest

Warning: Cannot update a component (BlockMobileToolbar) while rendering a different component (SlotComponent). To locate the bad setState() call inside SlotComponent, follow the stack trace as described in https://reactjs.org/link/setstate-in-render

Full message Warning: Cannot update a component (`BlockMobileToolbar`) while rendering a different component (`SlotComponent`). To locate the bad setState() call inside `SlotComponent`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render in SlotComponent (at slot.js:91) in Slot (at slot-fill/index.native.js:16) in Slot (at slot-fill/index.native.js:23) in SettingsToolbarButtonSlot (at block-mobile-toolbar/index.native.js:70) in RCTView (at View.js:34) in View (at block-mobile-toolbar/index.native.js:57) in BlockMobileToolbar (at with-dispatch/index.js:96) in WithDispatch(BlockMobileToolbar) (at with-select/index.js:57) in Unknown (at pure/index.tsx:43) in WithSelect(WithDispatch(BlockMobileToolbar)) (at block.native.js:264) in RCTView (at View.js:34) in View (at block.native.js:259) in RCTView (at View.js:34) in View (at block.native.js:213) in RCTView (at View.js:34) in View (at block.native.js:209) in TouchableWithoutFeedback (at block.native.js:204) in BlockListBlock (at with-preferred-color-scheme/index.native.js:30) in WithPreferredColorScheme(BlockListBlock) (at with-dispatch/index.js:96) in WithDispatch(WithPreferredColorScheme(BlockListBlock)) (at with-select/index.js:57) in Unknown (at pure/index.tsx:43) in WithSelect(WithDispatch(WithPreferredColorScheme(BlockListBlock))) (at block-list-item.native.js:148) in RCTView (at View.js:34) in View (at block-list-item.native.js:141) in RCTView (at View.js:34) in View (at readable-content-view/index.native.js:58) in RCTView (at View.js:34) in View (at readable-content-view/index.native.js:57) in ReadableContentView (at block-list-item.native.js:131) in BlockListItem (at with-select/index.js:57) in Unknown (at pure/index.tsx:43) in WithSelect(BlockListItem) (at block-list/index.native.js:321) in RCTView (at View.js:34) in View (at VirtualizedList.js:2015) in VirtualizedListCellContextProvider (at VirtualizedList.js:2030) in CellRenderer (at VirtualizedList.js:807) in RCTView (at View.js:34) in View (at ScrollView.js:1107) in RCTScrollView (at ScrollView.js:1238) in ScrollView (at ScrollView.js:1264) in ScrollView (at VirtualizedList.js:1250) in VirtualizedListContextProvider (at VirtualizedList.js:1080) in VirtualizedList (at FlatList.js:620) in FlatList (at keyboard-aware-flat-list/index.android.js:13) in RCTView (at View.js:34) in View (at KeyboardAvoidingView.js:220) in KeyboardAvoidingView (at keyboard-aware-flat-list/index.android.js:12) in KeyboardAwareFlatList (at block-list/index.native.js:238) in RCTView (at View.js:34) in View (at block-list/index.native.js:232) in BlockList (at with-preferred-color-scheme/index.native.js:30) in WithPreferredColorScheme(BlockList) (at with-dispatch/index.js:96) in WithDispatch(WithPreferredColorScheme(BlockList)) (at with-select/index.js:57) in Unknown (at pure/index.tsx:43) in WithSelect(WithDispatch(WithPreferredColorScheme(BlockList))) (at visual-editor/index.native.js:61) in VisualEditor (at layout/index.native.js:100) in RCTView (at View.js:34) in View (at layout/index.native.js:131) in RCTView (at View.js:34) in View (at SafeAreaView.js:41) in SafeAreaView (at layout/index.native.js:123) in RCTView (at View.js:34) in View (at tooltip/index.native.js:268) in TooltipSlot (at layout/index.native.js:122) in Layout (at with-preferred-color-scheme/index.native.js:30) in WithPreferredColorScheme(Layout) (at with-select/index.js:57) in Unknown (at pure/index.tsx:43) in WithSelect(WithPreferredColorScheme(Layout)) (at editor.native.js:167) in BlockEditorProvider (at with-registry-provider.js:24) in Unknown (at with-registry/index.js:23) in WithRegistryProvider(BlockEditorProvider) (at provider/index.js:108) in BlockContextProvider (at provider/index.js:107) in EntityProvider (at provider/index.js:106) in EntityProvider (at provider/index.js:105) in EditorProvider (at with-registry-provider.js:27) in Unknown (at with-registry/index.js:23) in WithRegistryProvider(EditorProvider) (at provider/index.native.js:288) in NativeEditorProvider (at with-dispatch/index.js:96) in WithDispatch(NativeEditorProvider) (at with-select/index.js:57) in Unknown (at pure/index.tsx:43) in WithSelect(WithDispatch(NativeEditorProvider)) (at editor.native.js:160) in SlotFillProvider (at editor.native.js:159) in Editor (at with-dispatch/index.js:96) in WithDispatch(Editor) (at with-select/index.js:57) in Unknown (at pure/index.tsx:43) in WithSelect(WithDispatch(Editor)) (at src/index.native.js:31) in Unknown (at renderApplication.js:47) in RCTView (at View.js:34) in View (at AppContainer.js:107) in RCTView (at View.js:34) in View (at AppContainer.js:134) in AppContainer (at renderApplication.js:40)

To Reproduce
Steps to reproduce the behavior:

  1. Start the demo app and will load from Metro
  2. Focus the title block
  3. Add a block via the Block Picker
  4. Notice the error/warning in the log output

Smartphone (please complete the following information):

  • Device: Pixel 2XL
  • OS: Android 11

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions