Skip to content

ui: AnchorErrorBoundary does not reset error state when children prop changes #511

@Haroldwonder

Description

@Haroldwonder

Problem

AnchorErrorBoundary is a class component that catches errors and shows a fallback. Once an error is caught, the error state persists even if the parent replaces the children prop with a completely different component tree. The user is stuck on the error screen.

Location

ui/components/AnchorErrorBoundary.tsx

Fix

Implement getDerivedStateFromProps to reset hasError when a key prop changes, or expose a resetKeys prop (similar to react-error-boundary) that triggers a reset when any key value changes.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions