Skip to content

Update card.tsx - #5415

Open
MaddipatlaChetan24 wants to merge 1 commit into
uber:mainfrom
MaddipatlaChetan24:patch-4
Open

Update card.tsx#5415
MaddipatlaChetan24 wants to merge 1 commit into
uber:mainfrom
MaddipatlaChetan24:patch-4

Conversation

@MaddipatlaChetan24

Copy link
Copy Markdown
Contributor

Fixes #1, Fixes #2

Description

Hoists the levels array (['', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']) out of
the SemanticTitle component in Card into a module-level constant
(HEADING_LEVELS). Previously this array literal was re-allocated on every
render of SemanticTitle, which runs for every Card with a title and
re-runs on every re-render. The array's contents never change, so it only
needs to be allocated once at module load. No change to rendered output or
component behavior.

Scope

Patch: Bug Fix

@MaddipatlaChetan24

Copy link
Copy Markdown
Contributor Author

can you please check this !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant