`Uncaught Error: must set key for <rc-animate> children` on modal
See original GitHub issueWhen using preact and modals, I’m getting Uncaught Error: must set key for <rc-animate> children
.
The issue seems to be due to https://github.com/react-component/dialog/blob/master/src/Dialog.tsx#L191 needing a key for rc-animate to not complain.
I don’t know why this is not thrown if I use react.
Here the stacktrace.
Animate.js:290 Uncaught Error: must set key for <rc-animate> children
at http://localhost:3011/client/index.js:147664:17
at Array.map (native)
at cl.render (http://localhost:3011/client/index.js:147659:32)
at callMethod (http://localhost:3011/client/index.js:1178:12)
at cl.render (http://localhost:3011/client/index.js:1186:12)
at renderComponent (http://localhost:3011/client/index.js:146284:60)
at setComponentProps (http://localhost:3011/client/index.js:146265:103)
at buildComponentFromVNode (http://localhost:3011/client/index.js:146354:13)
at idiff (http://localhost:3011/client/index.js:146160:48)
at innerDiffNode (http://localhost:3011/client/index.js:146211:21)(anonymous function) @ Animate.js:290render @ Animate.js:285callMethod @ index.js:442(anonymous function) @ index.js:450renderComponent @ preact.js:303setComponentProps @ preact.js:284buildComponentFromVNode @ preact.js:373idiff @ preact.js:179innerDiffNode @ preact.js:230idiff @ preact.js:196innerDiffNode @ preact.js:230idiff @ preact.js:196diff @ preact.js:157renderComponent @ preact.js:326renderComponent @ preact.js:317setComponentProps @ preact.js:284buildComponentFromVNode @ preact.js:373idiff @ preact.js:179diff @ preact.js:157render @ preact.js:409render @ index.js:142renderSubtreeIntoContainer @ index.js:160_renderComponent @ getContainerRenderMixin.js:47componentDidMount @ getContainerRenderMixin.js:59callMethod @ index.js:442(anonymous function) @ index.js:450flushMounts @ preact.js:149renderComponent @ preact.js:354setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310setComponentProps @ preact.js:284renderComponent @ preact.js:310forceUpdate @ preact.js:472(anonymous function) @ History.js:46(anonymous function) @ createTransitionManager.js:66notifyListeners @ createTransitionManager.js:65setState @ createBrowserHistory.js:99(anonymous function) @ createBrowserHistory.js:188confirmTransitionTo @ createTransitionManager.js:44push @ createBrowserHistory.js:168StaticRouter._this.transitionTo @ StaticRouter.js:46Link._this.handleTransition @ Link.js:55Link._this.handleClick @ Link.js:46eventProxy @ preact.js:130
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
must set key for <rc-animate> children` on modal #4120
When using preact and modals, I'm getting Uncaught Error: must set key for <rc-animate> children . The issue seems to be due to ......
Read more >must set key for <rc-animate> children on modal(React- ...
Uncaught Error : must set key for <rc-animate> children on modal(React-select)解决方式 const newDefaultValue = defaultValue.filter(e => e !== ...
Read more >Uncaught Error: must set key for <rc-animate> children 解决办法
描述: 今天在页面跳转的时候遇到了一个UncaughtError:mustsetkeyfor children的问题,主要是因为mode属性造成,...,CodeAntenna技术文章技术问题代码片段及聚合.
Read more >Uncaught Error: must set key for <rc-animate> children
TreeSelect treeCheckStrictly true: Uncaught Error: must set key for <rc-animate> children · Overview · Backers (0) · Updates ...
Read more >React Antd Modal Property 'children' does not exist on type ...
Issue is related to latest updates of types in react 18. In order to avoid this error if you use yarn ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got this error today , finally i solve it by this
by add uid filed
I’m facing this same problem with react. 😦 When using Upload inside Modal.