Is forwardRef going to be implemented ?
- 主要言語
- JavaScript
- スター
- 11.9k
- フォーク
- 2.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Currently using **Next.js** for a project, and I am trying to use the new Dynamic Import with the Slider (react-slick) component to create a separate chunk.
The problem is that I need to forward the ref to be able to use a custom Next & Prev button.
React has a new API to allow that, [forwardRef](https://reactjs.org/docs/forwarding-refs.html#forwarding-refs-to-dom-components)
**Steps to replicate :**
1 - First I need to Dynamically Import react-slick :
```jsx
const DynamicSlider = dynamic(() => import('react-slick'))
```
2 - Then use the forwardRef api :
```jsx
const ForwardedSlider = React.forwardRef((props, ref) => (
{props.children}
))
```
3 - And use ForwardedSlider :
```jsx
```
Even if my component is rendered, I can't access to the object 'myRef' and can't use my custom buttons
コントリビューションガイド
評価
この issue はまだ評価されていません。