g787543/infinite-react-carousel

Error: cannot create array

Closed this issue · 10 comments

Get below error when try to use this control in one of my react project using SPFx framework:

Error: can not create array
at new CircularArray (array.js:115)
at Slider. (slider.js:208)
at Yi (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)
at $i (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)
at Na (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)
at Ma (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)
at sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1
at Object.Ay1f.t.unstable_runWithPriority (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)
at wo (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)
at xo (sp-webpart-workbench-assembly_en-us_78bb8d9cee2a1258615d5c8689e23963.js:1)

Any help would be highly appreciated!

Get below error when try to use this control in one of my react project using SPFx framework:

Did you solve it? @g787543, could you tell something about it? I have the same problem when I refresh the page with the Slider.

@lukaszewiczAd I had to use another control as I had time limitations. I used slick-slider which seems much easier to extend and meets most of my requirements.

same problem here.

same problem here.

Also same problem

I have the same problem. Solution?

this worked for me as i found that the slider component doesn't load immediately.

const [isSlider, setisSlider] = useState(false)
useEffect(()=>{
setisSlider(true)
},[])

return (

{sliderVisible && //slide items here }
);

como o amigo @farhan-amjad disse, isso funcionou pra mim tbm, estava quebrando a cabeça com isso achei que teria que usar outra lib obrigado @farhan-amjad

const [isSlider, setisSlider] = useState(false) useEffect(()=>{ setisSlider(true) },[])

retornar (

{sliderVisível & //deslize os itens aqui }
);

this worked for me as i found that the slider component doesn't load immediately.

const [isSlider, setisSlider] = useState(false) useEffect(()=>{ setisSlider(true) },[])

return (
{sliderVisible && //slide items here }
);

As simple as it may seem, this was the solution for me.