-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using async have a problem #23
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi again
I want to use async and I just copy your example code, and I get my data from parent and passing to child with props , but i have memory exceed error , what should i do ?
I'm beginner in react :)
my error :
`
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
`
and my code :
componentDidMount() { var treeData = this.props.treeData if(treeData !== ''){ if(treeData !== []){ var treeDataArray = [] console.log(treeData, 'treeData') treeData.forEach(element => { let newTreeObj = { id: element.pid, name:
${element.title} - ${element.entityTypeName}`}
treeDataArray.push(newTreeObj)
})
}
render() {
return (
`
The text was updated successfully, but these errors were encountered: