ReactList
A versatile infinite scroll React component.
Install
bower install react-list
# or
npm install react-list
ReactList depends on React.
Examples
Check out the example page and the the example page source for examples of different configurations.
Here's another simple example to get you started.
import loadAccount from 'my-account-loader';
import React from 'react';
import ReactList from 'react-list';
class MyComponent extends React.Component {
state = {
accounts: []
};
componentWillMount() {
loadAccounts(::this.handleAccounts);
}
handleAccounts(accounts) {
this.setState({accounts});
}
renderItem(index, key) {
return
}
render() {
return (
Accounts
itemRenderer={::this.renderItem}
length={this.state.accounts.length}
type='uniform'
/>
);
}
}
Props
axis (defaults to y)
The axis that this list scrolls on.
initialIndex