Uncaught Error: Objects are not valid as a React child (found: object with keys {@id, id, name, disabled, parent, children, code}). If you meant to render a collection of children, use an array instead #2663
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
table,树型列表,在列表面第一次加载的时候没有报错,然后修改数据,提交到api,api返回同样的数据后setList(newData) 后就报这个错误。每一个node的格式为{@id, id, name, disabled, parent, children, code}
重要:加载页面用的useEffect从接口取数据,然后setList,修改后也是setList,两次数据完全一样
Beta Was this translation helpful? Give feedback.
All reactions