fix: disable periodic updates for react-moment components #1127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
During tests, there are instances when periodic updates causes errors
due to calling
setState
when the component is unmounted.Reason:
By default, the Moment component sets a timer on a 60s interval to
update the time shown.
Solution
Our time displays are all static so we don't need this feature. Hence, disable it.
This should also slightly improve efficiency since app will do less work.
Before & After Screenshots
There are no visual changes.
Tests
These tests have been verified on a local dev machine.
Assert that there are no visual changes:
Assert that the Dashboard integration tests run without console errors:
Deploy Notes
There are no deploy notes.