-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
hoc components require keys when displayed next to each other #1814
Comments
I'm guessing react thinks these are a list of the same components and thus require keys to identify themselves. You could get around it by wrapping the |
I have the same issue. Two different components using the same HOC. In my case it seams the two components get their key based on the name from the HOC,
Is this related to storybook or react? |
Issue is present only when using
Actually, if you use addon-info, you may want to add displaynames anyway, so that your component names are displayed correctly in prop tables: https://github.com/storybooks/storybook/tree/master/addons/info#the-faq |
Thank you. Removed Column.displayName = 'Column';
export default getGridConfig(Column); Still seeing the error and under info the HOC is displayed rather than the name of the wrapped component. Instead of seeing: <Column columns={{xxs: {2}}}> I'm getting: <getGridConfig columns={{xxs: {2}}}> I'm on version |
It should rather be
There is also in issue regarding displaying HOCs in addon-info: #938 |
By the way, the fix for key waning has landed in 3.2.15 |
same hoc wrap component put in storybook
warning:Encountered two children with the same key,
1:$
. Child keys must be unique; when two children share a key, only the first child will be used.such as:
normal Running environment has not this warning.
The text was updated successfully, but these errors were encountered: