Skip to content

Commit

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

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
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Oct 22, 2024
1 parent 3dfe22b commit 7e9b984
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 7e9b984

Please sign in to comment.