You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Experimenting with a new architecture as an HOC. I like this as it gives more control to the consumer. One question I've been thinking about is which options, if any, to use as HOC parameters vs properties?
// the HOCimportVirtualListfrom'react-virtual-list';// your componentconstMyList=({
virtual,
itemHeight,})=>(<ulstyle={virtual.style}>{virtual.items.map((item)=>(<likey={`item${item.id}`}style={{height: itemHeight}}>
Lorem ipsum dolor sit amet
</li>))}</ul>);// using the HOC - which options, if any, should go in here?constoptions={scrollThrottle: 1000,};constMyVirtualList=VirtualList(options)(MyList);// rendering - which options should be props here?<MyVirtualListitems={myBigListOfItems}container={window}itemBuffer={0}itemHeight={100}/>
The text was updated successfully, but these errors were encountered:
Experimenting with a new architecture as an HOC. I like this as it gives more control to the consumer. One question I've been thinking about is which options, if any, to use as HOC parameters vs properties?
The text was updated successfully, but these errors were encountered: