Open Maclay74 opened 7 months ago
For some reason I can't retrive ref from the carousel:
<TinySlider {...props} ref={ref => console.log(ref)} />
I get error saying that there is no such prop. In @types/tiny-slider-reader I don't see any ref prop available too.
@types/tiny-slider-reader
If I ignore this, I get this error in browser:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
And if I pass it like
<TinySlider {...props} forwardedRef={ref => console.log(ref)} />
I get a reference to html element, not tiny-slider. And then application falls with error that children.length is undefined.
children.length is undefined.
What am I doing wrong?
For some reason I can't retrive ref from the carousel:
I get error saying that there is no such prop. In
@types/tiny-slider-reader
I don't see any ref prop available too.If I ignore this, I get this error in browser:
And if I pass it like
I get a reference to html element, not tiny-slider. And then application falls with error that
children.length is undefined.
What am I doing wrong?