React-slick: There's no ref.

Created on 6 Jun 2018  路  1Comment  路  Source: akiran/react-slick

Hi

when I do:

<Slider
    ref={slider => (this.slider = slider)}                
>
    {this.props.children}
</Slider>

there's no ref in my component.

I've noticed that the ref function is never called. When I do

<Slider
    ref={slider => {this.slider = slider; console.log("test");}}    
>
    {this.props.children}
</Slider>

the console never outputs "test".

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laveesingh picture laveesingh  路  3Comments

jfamousket picture jfamousket  路  3Comments

will88 picture will88  路  3Comments

adamthewan picture adamthewan  路  4Comments

vugman picture vugman  路  3Comments