akiran / akiran/react-slick

Use forwardRef to pass the ref up the component tree

オープン
#1,690 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
11.9k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm currently trying to expose slick to my component so I can use `.slick('resize')`.

However, the ref seems to return the ReactSlick instance itself and that doesn't seem to contain a ref to the slick instance.

React has a newish feature called [forwardRef](https://reactjs.org/docs/forwarding-refs.html) which enables a component to forward the ref down to the base component/node. Would be really useful to have this and expose the slick instance right the way up the tree.

Alternatively, does anyone know a way of exposing the slick instance or triggering the resize event?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。