reactjs 突然报错 Error: Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?

在开发环境没问题,但是测试环境会抱着个错
vendors.umi.da0aa8ca.async.js:formatted:54915 Error: Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?invariant=152&args[]=se for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at vendors.umi.da0aa8ca.async.js:formatted:53358:25
at Ka (vendors.umi.da0aa8ca.async.js:formatted:54034:36)
at Lu (vendors.umi.da0aa8ca.async.js:formatted:56441:21)
at zs (vendors.umi.da0aa8ca.async.js:formatted:55932:21)
at Ls (vendors.umi.da0aa8ca.async.js:formatted:55925:22)
at Ms (vendors.umi.da0aa8ca.async.js:formatted:55680:25)
at vendors.umi.da0aa8ca.async.js:formatted:52668:37
at t.unstable_runWithPriority (vendors.umi.da0aa8ca.async.js:formatted:1220:24)
at ui (vendors.umi.da0aa8ca.async.js:formatted:52639:13)
at fi (vendors.umi.da0aa8ca.async.js:formatted:52664:21)

解决方案

  1. 排查是否在render 里面直接跟注释
    reactjs 突然报错 Error: Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?_第1张图片
    解决: 注释不要直接跟在后面
    2: 排查是否有如下
    reactjs 突然报错 Error: Minified React error #152; visit https://reactjs.org/docs/error-decoder.html?_第2张图片
    解决 state ? :null

你可能感兴趣的:(react.js,javascript,前端)