Skip to content

scrollToIndex using the reanimated version of AnimatedLegendList #259

@DOPAgyeman

Description

@DOPAgyeman

How do you implement scrollToIndex using AnimatedLegendList? I'm receiving an error when passing the ref to the component.

import { useRef } from 'react';
import { AnimatedLegendList } from "@legendapp/list/reanimated";
import { type LegendListRef } from "@legendapp/list";

export function ReanimatedExample() {

const ref = useRef<LegendListRef>(null);

  return (
    <AnimatedLegendList
      ref={ref}
      data={data}
      renderItem={renderItem}
    />
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions