📜  反应弹簧过渡动画 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:56.143000             🧑  作者: Mango

代码示例1
const [items, set] = useState([...])
const transitions = useTransition(items, item => item.key, {
from: { transform: 'translate3d(0,-40px,0)' },
enter: { transform: 'translate3d(0,0px,0)' },
leave: { transform: 'translate3d(0,-40px,0)' },
})
return transitions.map(({ item, props, key }) =>
{item.text}
)