You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why? Because some times in conditions it's needed to use an array with statically (never changing) defined JSX items. I think it's reasonable since workaround was proposed but just without JSX syntax: facebook/react#2816 (comment)
The text was updated successfully, but these errors were encountered:
However, it is not allowed as part of the React implementation of JSX. The best practice is to use nested arrays to ensure that different child sets have unique keys.
The issue of putting static items in an array and not wanting to assign keys to them could be solved by a fragment syntax for example. This could mark them as static for the key warning.
I would like to propose this syntax:
For React this would transform into this:
Why? Because some times in conditions it's needed to use an array with statically (never changing) defined JSX items. I think it's reasonable since workaround was proposed but just without JSX syntax: facebook/react#2816 (comment)
The text was updated successfully, but these errors were encountered: