Skip to content

element.ref React 19 #1543

Closed
Closed
@erie-e9

Description

@erie-e9

Current behavior

Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.

Image

Expected behavior

Terminal throws this error using this package, it disappears when replace it for FlatList

To Reproduce

import React from "react";
import { View, Text } from "react-native";
import { FlashList } from "@shopify/flash-list";

const DATA = [
  {
    title: "First Item",
  },
  {
    title: "Second Item",
  },
];

const MyList = () => {
  return (
    <FlashList
      data={DATA}
      renderItem={({ item }) => <Text>{item.title}</Text>}
      estimatedItemSize={200}
    />
  );
};

Platform:

  • iOS
  • Android

Environment

hermes enabled, new arch

"react": "19.0.0",
"react-native": "0.78.0",
"@shopify/flash-list": "^1.7.3",

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions