Skip to content

[EuiDelayRender] Migrate from class to function component #9501

@weronikaolejniczak

Description

@weronikaolejniczak

EuiDelayRender delays rendering its children until a specified time has elapsed. Used to prevent flash of loading content.

  • File: components/delay_render/delay_render.tsx
  • Class size: 52 lines
  • State: toggle
  • Lifecycle: componentDidMount, shouldComponentUpdate, componentDidUpdate, componentWillUnmount

Migration notes:

Small but uses shouldComponentUpdate for render gating. The shouldComponentUpdate pattern maps to React.memo or conditional rendering in the function body. Timer management maps to useEffect.

Acceptance criteria:

  • Convert to function component with hooks
  • Replace shouldComponentUpdate with React.memo or conditional render
  • Maintain delay timing behavior
  • All existing tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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