Skip to content
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

【Javascript】useEffect 死循环原理分析 #46

Open
AwesomeDevin opened this issue Apr 14, 2021 · 0 comments
Open

【Javascript】useEffect 死循环原理分析 #46

AwesomeDevin opened this issue Apr 14, 2021 · 0 comments

Comments

@AwesomeDevin
Copy link
Owner

AwesomeDevin commented Apr 14, 2021

什么情况下会出现死循环

  1. props设置了默认值为复合类型,且被劫持
import { useEffect, useState } from 'react'
function Form(props){
 
  const [value, key] = useState('')
   const { data } = props
    


   return  <div>form</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant