import React, { Component } from 'react'
import Slider from '../src/slider'

export default class PreviousNextMethods extends Component {
  constructor(props) {
    super(props)
    this.next = this.next.bind(this)
    this.previous = this.previous.bind(this)
  }
  next() {
    this.refs.slider.slickNext()
  }
  previous() {
    this.refs.slider.slickPrev()
  }
  render() {
    const settings = {
      dots: true,
      infinite: true,
      speed: 500,
      slidesToShow: 1,
      slidesToScroll: 1,
    };
    return (
      <div>
        <h2>Previous and Next methods</h2>
        <Slider ref='slider' {...settings}>
          <div key={1}><h3>1</h3></div>
          <div key={2}><h3>2</h3></div>
          <div key={3}><h3>3</h3></div>
          <div key={4}><h3>4</h3></div>
          <div key={5}><h3>5</h3></div>
          <div key={6}><h3>6</h3></div>
        </Slider>
        <div style={{textAlign: 'center'}}>
          <button className='button' onClick={this.previous}>Previous</button>
          <button className='button' onClick={this.next}>Next</button>
        </div>
      </div>
    );
  }
}

@@ -269,37 +269,32 @@
 xt() %7B%0A    this.
-refs.
 slider.slickNext
@@ -328,13 +328,8 @@
 his.
-refs.
 slid
@@ -588,16 +588,31 @@
 ref=
-'slider'
+%7Bc =%3E this.slider = c %7D
  %7B..

Update PreviousNextMethods.js