Skip to content

ref.measurelayout must be called with a ref to a native component #593

@sgup

Description

@sgup

Describe the bug
The list works, but I see this error in my simulator when the component is mounted.

My Code

<KeyboardAvoidingView
  behavior={Platform.OS === "ios" ? "padding" : "height"}
  style={{ flex: 1, backgroundColor: theme.background }}
  keyboardVerticalOffset={Platform.OS === "ios" ? 90 : 0}
  >
  <NestableScrollContainer ref={scrollRef} style={{ flex: 1 }}>
      {/* Other Components */
      <NestableDraggableFlatList
      	ref={flatListRef}
      	data={[...routineOrder]}
      	onDragEnd={handleDragEnd}
      	keyExtractor={(item) => item}
      	renderItem={renderRoutineItem}
      	contentContainerStyle={{ paddingBottom: 20 }}
      	activationDistance={10}
      	dragHitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
      	containerStyle={{ flex: 1 }}
      />
      {/* Other Components */
  </NestableScrollContainer>
</KeyboardAvoidingView>

Platform & Dependencies
Please list any applicable dependencies in addition to those below (react-navigation etc).

  • react-native-draggable-flatlist version: 4.0.3
  • Platform: Expo
  • React Native or Expo version: expo @ 53.0.4
  • Reanimated version: 3.17.5
  • React Native Gesture Handler version: 2.25.0

Additional context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions