Skip to content

Commit

Permalink
Eliminate final few React$AbstractComponent (facebook#47163)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#47163

In order to adopt react 19's ref-as-prop model, we need to eliminate all the places where they are treated differently. `React.AbstractComponent` is the worst example of this, and we need to eliminate it.

This diff replaces final few in libdefs.

Changelog: [internal]

Reviewed By: alexmckenley

Differential Revision: D64776942

fbshipit-source-id: 5e96c6d4fecb1b6cf539a00aecb10b9b35fc140b
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Oct 22, 2024
1 parent 7715a95 commit aadb1d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/rn-tester/js/components/RNTesterModuleList.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const renderSectionHeader = ({section}: {section: any, ...}) => (
</RNTesterThemeContext.Consumer>
);

const RNTesterModuleList: React.ComponentType<any> = React.memo(
const RNTesterModuleList: React.ComponentType<any> = React.memo<any>(
({sections, handleModuleCardPress}) => {
const filter = ({example, filterRegex, category}: any) =>
filterRegex.test(example.module.title) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ function Item(props: {data: ItemDataType}): React.Node {
);
}

interface ItemListProps {
data: ItemDataType[];
useFlatList?: boolean;
onScroll?: (evt: ScrollEvent) => void;
}
type ItemListProps = $ReadOnly<{
data: ItemDataType[],
useFlatList?: boolean,
onScroll?: (evt: ScrollEvent) => void,
...
}>;

function renderItem({item}: {item: ItemDataType, ...}): React.MixedElement {
return <Item data={item} />;
Expand Down

0 comments on commit aadb1d9

Please sign in to comment.