Skip to content

Typing issue on innerRef #52

@alexstrat

Description

@alexstrat

innerRef prop actually gets a an AnimatedComponent<FlatList | ScrollView | SectionList> rather than just a FlatList | ScrollView | SectionList (the type AnimatedComponent<T> does not exist in reanimated though).

We should do something like this:

class AnimatedFlatList extends Component<AnimateProps<FlatListStyle, FlatListProps>> {
  getNode(): ReactNativeView;
}

// same for AnimatedScrollView and AnimatedSectionList

type Props = {
  ...,
  innerRef: RefObject<AnimatedFlatList | AnimatedScrollView | AnimatedSectionList>;
}

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