Skip to content

[EuiMutationObserver] Migrate from class to function component #9459

@weronikaolejniczak

Description

@weronikaolejniczak

EuiMutationObserver wraps the browser MutationObserver API as a render-prop component. It extends EuiObserver.

  • File: components/observer/mutation_observer/mutation_observer.tsx
  • Class size: 18 lines
  • State: None (stateless)
  • Lifecycle: Inherited from EuiObserver

Migration notes:

Trivial migration once EuiObserver base is converted. Essentially just calls the observer setup with MutationObserver-specific config. Should be migrated together with EuiObserver.

Acceptance criteria:

  • Convert to function component
  • Maintain identical MutationObserver behavior
  • All existing tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedThe EUI team is unlikely prioritize. (Don't delete - used for automation)low hanging fruitAn issue, often a bug, that is lower effort and clearly ought to be fixed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions