Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to resolve Warning: Prop style did not match. #873

Open
pittleCheung opened this issue Nov 1, 2022 · 3 comments
Open

how to resolve Warning: Prop style did not match. #873

pittleCheung opened this issue Nov 1, 2022 · 3 comments

Comments

@pittleCheung
Copy link

image

@pittleCheung
Copy link
Author

This problem occurs when I use ChromePicker in next.js

@DBorhara
Copy link

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.

@ajaykumareminence
Copy link

ajaykumareminence commented Sep 14, 2023

"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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants