import React, { Component } from 'react'; import { DataScroller } from '../../components/datascroller/DataScroller'; import { Button } from '../../components/button/Button'; import { Rating } from '../../components/rating/Rating'; import ProductService from '../service/ProductService'; import { AppInlineHeader } from '../../AppInlineHeader'; import './DataScrollerDemo.scss'; import { DataScrollerDoc } from './DataScrollerDoc'; export class DataScrollerDemo extends Component { constructor(props) { super(props); this.state = { products: [] }; this.productService = new ProductService(); this.itemTemplate = this.itemTemplate.bind(this); } componentDidMount() { this.productService.getProducts().then(data => this.setState({ products: data })); } itemTemplate(data) { return (
DataScroller displays data with on demand loading using scroll.