rax icon indicating copy to clipboard operation
rax copied to clipboard

[Question] useEffect里面的代码不会报错

Open yiescc opened this issue 3 years ago • 1 comments

背景:

  • useEffect里面执行的代码不会报错,会直接中断代码,需要自己try catch捕获错误

示例demo:

  const value = undefined;

  useEffect(() => {
    const a = value[0];
  }, [value]);

表现:

  • 原生react报错如下 image
  • 在raxzho中,没有报错

yiescc avatar Apr 18 '22 12:04 yiescc

我来看下

SoloJiang avatar May 15 '22 14:05 SoloJiang