#A props object containing a "key" prop is being spread into JSX

1 messages · Page 1 of 1 (latest)

jaunty magnet
#

Hey folks I'm using conform as form validation library with NextJs also I'm using better-auth as my auth library here is my code
https://mystb.in/d696cbf5421765be37
I don't know why it's throwing this error
The same code didn't throw any error like this Remix.run so I'm assuming it's a NextJs issue can anyone help me to deal with it

novel surgeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

blazing wyvern
#

It’s probably a react rule enforced by the linter.

Could you do this?

const {key, …restProps} = props

And then pass key = {key} and {…restProps} to the component that’s using them?

signal totem
#

you can do {...props} key={props.key} to fix it

#

if this is Conform, the next release will no longer use the key to reset inputs so this will go away, you could just choose to ignore it until then