react / react/react-native

Redesign Native RedBox

未关闭
#29,158 12 条评论 8 个 reaction 已指派 1 人 在 GitHub 查看

@TMaszko 已经在做这个了。

开始于 2022年3月13日。

Never gets stale Type: Discussion Type: Enhancement
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Overview

LogBox handles most errors users see but we still display native RedBoxes in cases where:

  • JavaScript has not loaded (e.g. Metro is unavailable)
  • JavaScript is unavailable (e.g. a syntax error in the bundle)
  • LogBox fails to render (e.g. an error in LogBox JavaScript)
  • Native log errors (e.g. RCTLogFatal)

This issue is to improve the fallback RedBox in these cases for a better experience.

Tasks

  • Update design to be in line with LogBox (see below)
  • Cleanup code by removing the symbolication logic (as this is handled by LogBox)
  • Remove stack trace since for all errors that this can occur the stack trace is not relevant

Designs

JavaScript has not loaded (Metro is unavailable)

image

JavaScript is not available (syntax error)

image

LogBox fails to render

image

Native log errors

image

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。