Raathigesh / retoggle

🎨 UI controls as React Hooks to control your component state from outside
https://retoggle.netlify.com/
MIT License
1.38k stars 27 forks source link

Get missing keys warning from React #9

Closed einarlove closed 5 years ago

einarlove commented 5 years ago

I get

Warning: Each child in an array or iterator should have a unique "key" prop.

for each knob added to the inspector. Is this a known issue?

Raathigesh commented 5 years ago

This is an issue that should be fixed and it's an easy fix too. We need to pass a key when we iterate over the knobs in here.

vivek12345 commented 5 years ago

For this key issue, should we just add the Component.displayName || Component.name as the key? @Raathigesh

Raathigesh commented 5 years ago

@vivek12345 If that works, that ok too 👍

hetpatel33 commented 5 years ago

@Raathigesh, Is anyone working on this? I am interested in claiming.

vivek12345 commented 5 years ago

@hetpatel33 you can claim this.

hetpatel33 commented 5 years ago

@hetpatel33 you can claim this.

Okay, I will submit a PR when it's done. Thanks.

Raathigesh commented 5 years ago

Fixed and released with https://github.com/Raathigesh/retoggle/releases/tag/v0.2.1

gitnix commented 5 years ago

Getting the key warning for version "0.3.0".

key warning
yyynnn commented 5 years ago

still here 0.3.0