📌  相关文章
📜  钩子状态数组更新后未触发 useEffect - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:40.198000             🧑  作者: Mango

代码示例1
const [skills, selectedSkills] = useState([])

     const onSelect = (selectedList) => {
            const tempSelectedList = [...selectedList]
            selectedSkills(tempSelectedList)
        }
     useEffect(() => {
            MyLogger('useEffect called')
        }, [skills])