📅  最后修改于: 2022-03-11 15:03:10.197000             🧑  作者: Mango
// https://mattclaffey.medium.com/adding-react-refs-to-an-array-of-items-96e9a12ab40c
const itemEls = useRef(new Array())
{items.map(item => (
itemEls.current.push(element)}>{item}
))