Skip to content

Fix redundant updates in MappingHome by restricting componentDidUpdate#27

Merged
snyaggarwal merged 2 commits intoOpenConceptLab:masterfrom
PratikshaJ-16:fix/restrict-componentDidUpdate
Apr 2, 2026
Merged

Fix redundant updates in MappingHome by restricting componentDidUpdate#27
snyaggarwal merged 2 commits intoOpenConceptLab:masterfrom
PratikshaJ-16:fix/restrict-componentDidUpdate

Conversation

@PratikshaJ-16
Copy link
Copy Markdown
Contributor

This PR improves the behavior of componentDidUpdate in MappingHome.jsx.

Changes:

  1. refreshDataByURL() is now triggered only when location.pathname changes.
    2.highlightFromSearch() runs only when searchMeta changes.

Why:

Previously, highlightFromSearch() was executed on every update, which could lead to unnecessary re-renders and redundant operations.
This change ensures updates occur only when relevant props change, improving performance and stability.

@snyaggarwal snyaggarwal merged commit d021e5c into OpenConceptLab:master Apr 2, 2026
1 check passed
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.

2 participants