Open pittleCheung opened 2 years ago
This problem occurs when I use ChromePicker in next.js
I know this is late @pittleCheung but just for anyone else who came across this with nextjs, you have to turn off SSR for the component.
"use client"
import { useState, useId } from "react"
import { SketchPicker } from "react-color"
export default function page(){
const pickerId = useId()
const [color, setColor] = useState('#70FF00');
function handleColor(args){
setColor(args.hex)
}
return(
<>
<SketchPicker color={color} onChange={handleColor} key={pickerId}/>
</>
)
}
facing the same issue