elastic / elastic/eui

[EuiErrorBoundary] Use lighter components for EuiErrorBoundary

Open
#9,691 3 comments 0 reactions 0 assignees View on GitHub
tech debt
Dominant language
TypeScript
Stars
6.4k
Forks
911
Avg merge
2d 11h
Merged PRs (30d)
65

Description

**Problem Statement**

I'm digging a bit on optimizing our bundles for an app that uses EUI. I noticed that we're loading EuiCodeBlock in EuiErrorBoundary only to wrap the error message and its title.  But EuiCodeBlock is very powerful and often results in code that is rarely used (mainly for syntax highlighting).

**Proposed Solution**

Use a lighter component to help render the error message and title.

**Value / Impact**

* Reduce the app bundle size for consumers
* Reduce the amount of unused Javascript

**Urgency**

Not urgent.

**Do alternatives or workarounds exist?**

Lazily-loading EuiCodeBlock and EuiErrorBoundary to render them only when an actual error happens.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.