motion
motion copied to clipboard
⛷ CSS Animation for React
## 解决的问题: 在React18中,在render里面操作delete容易导致意外的情况 ## 问题描述: 在给antd迁移upload的测试库到testing-lib的时候 发现下面的用例修改完语法之后在React18中一直无法通过测试 https://github.com/ant-design/ant-design/blob/master/components/upload/__tests__/uploadlist.test.js#L112-L152 uid为0的记录在删除时一直处在`animate-leave-active`的状态 调试过程中发现为CSSMotionList在调用CSSMotion组件时传入的onVisibleChange偶尔会变成undifined导致的问题 https://github.com/react-component/motion/blob/59dc90cd3645f9dfa95d4e7df68a5f06f3884e85/src/CSSMotionList.tsx#L143-L159 在测试用例中打印下图中的props.onVisibleChange会发现在某一时间点之后成了undefined,导致节点删不掉 https://github.com/react-component/motion/blob/59dc90cd3645f9dfa95d4e7df68a5f06f3884e85/src/CSSMotion.tsx#L154-L159 ## 解决方法: 将CSSMotionList.tsx里render中的delete操作替换为不修改原对象的取值操作,测试即可通过
We are very badly stuck with testing our UI which is based on AntD. One problem we are facing is the Tree component which uses rc-motion to animate expand and...
Can we bump @babel/runtime to 7.12? Current version will get error when using webpack 5. more context: https://github.com/babel/babel/issues/12058
[Warning about deprecated findDOMNode usage ](https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage) https://github.com/react-component/motion/blob/4f37848655a989eca2d55855553a2b514e56dc15/src/CSSMotion.tsx#L4
project: https://github.com/orgs/react-component/projects/1/views/1
[https://codesandbox.io/s/eager-pine-9kh0k?file=/src/index.js](url) console中的输出,先正确输出类名,然后输出undefined
Hi! I don't use CSSMotionList, only CSSMotion. But i noticed that CSSMotionList still gets in the bundle. is this behavior correct? can this be fixed somehow from the library side...
Hi, I am trying to trace the root cause of https://github.com/ant-design/ant-design/issues/38818 , and I believe this is related to rc-motion, either being buggy on react-18, or maybe misused. Here is...
Currently react 18 is in dev deps, but the samples does not use the new API.