Skip to content

chore: Optimize cache cleanup timer#601

Open
Bvegas882 wants to merge 1 commit intoparitytech:masterfrom
Bvegas882:patch-1
Open

chore: Optimize cache cleanup timer#601
Bvegas882 wants to merge 1 commit intoparitytech:masterfrom
Bvegas882:patch-1

Conversation

@Bvegas882
Copy link

This PR improves the App component by properly managing the cache cleanup timer using React lifecycle methods.

Changes made:

  • Added a private cacheTimer property to store the timer reference
  • Moved the setInterval call from constructor to componentDidMount
  • Added proper cleanup in componentWillUnmount
  • Removed redundant comments

This change ensures that the timer is properly cleaned up when the component unmounts, preventing potential memory leaks and unnecessary re-renders.

@cla-bot-2021
Copy link

cla-bot-2021 bot commented May 6, 2025

User @Bvegas882, please sign the CLA here.

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