Upgrade to Pro — share decks privately, control downloads, hide ads and more …

沒想過的前端錯誤處理 可能比你有做的還多

沒想過的前端錯誤處理 可能比你有做的還多

Speaker: Yu Chen
Event: SITCON 2024

Avatar for LINE Developers Taiwan

LINE Developers Taiwan PRO

March 18, 2024
Tweet

More Decks by LINE Developers Taiwan

Other Decks in Technology

Transcript

  1. ErrorBoundary 實作邏輯 渲染 children 時 有沒有發⽣錯誤 檢查 hasError 的狀態 true

    開始渲染 渲染 fallback false 沒有 正常顯⽰ children 將 hasError 設成 true,並做錯誤處理 有