[Question] useEffect里面的代码不会报错
Open
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 611
- PR merge metrics
- No merged PRs in 30d
Description
背景:
- useEffect里面执行的代码不会报错,会直接中断代码,需要自己try catch捕获错误
示例demo:
```
const value = undefined;
useEffect(() => {
const a = value[0];
}, [value]);
```
表现:
- 原生react报错如下
- 在raxzho中,没有报错
Contributor guide
Research direction
Start with the supplied JavaScript reproduction and compare its behavior in native React with raxzho. No repository file or test is named, so trace the useEffect entry point and determine why the exception is not reported; done means the behavior is explained and a regression check captures the expected error handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100