The modern scrolling component for React and React Native
npm install @scrolloop/react
# or
yarn add @scrolloop/react
# or
pnpm add @scrolloop/reactnpm install @scrolloop/react-native
# or
yarn add @scrolloop/react-native
# or
pnpm add @scrolloop/react-nativeimport { VirtualList } from "@scrolloop/react";
function App() {
const items = Array.from({ length: 1000 }, (_, i) => `Item #${i}`);
return (
<VirtualList
count={items.length}
itemSize={50}
height={400}
renderItem={(index, style) => (
<div key={index} style={style}>
{items[index]}
</div>
)}
/>
);
}import { View, Text } from "react-native";
import { VirtualList } from "@scrolloop/react-native";
function App() {
const items = Array.from({ length: 1000 }, (_, i) => `Item #${i}`);
return (
<VirtualList
count={items.length}
itemSize={50}
renderItem={(index, style) => (
<View key={index} style={style}>
<Text>{items[index]}</Text>
</View>
)}
/>
);
}- @scrolloop/core: Platform-agnostic virtual scrolling logic
- @scrolloop/react: React implementation
- @scrolloop/react-native: React Native implementation
MIT