Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Formik props and Radium interactive style unique key #1055

Open
douglasrcjames opened this issue Jan 29, 2021 · 0 comments
Open

Formik props and Radium interactive style unique key #1055

douglasrcjames opened this issue Jan 29, 2021 · 0 comments

Comments

@douglasrcjames
Copy link

douglasrcjames commented Jan 29, 2021

I am using Formik for my React app and I am trying to use this library for a CSS-in-JS solution that offers easy hover effects and more. I have found that my button within a {(props)=> (...)} wrapper, which is used by Formik, will cause this error to trigger: Radium requires each element with interactive styles to have a unique key, set using either the ref or key prop. Key "submit" is a duplicate. . Simply commenting out that props wrapper will cause the error to go away, but I need it for Formik props! No matter what you make the key, the error will still trigger.

Codesandbox example: https://codesandbox.io/s/formik-radium-hover-working-vhz5i?file=/src/Register.js:1232-1361

Any ideas for a workaround? Is this a Formik issue?

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

No branches or pull requests

1 participant