Open ShatilKhan opened 6 months ago
I have tried to use a helper function getIconAndLoadingStatus to return necessary values without having to mutate any variables.The returned values are then destructured into initialIcon and isLoading, which are used to set the state.
getIconAndLoadingStatus
Fixes #1167
yarn lint
yarn test-unit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
@BSFishy Can you let me know if this is the right approach?
Description
I have tried to use a helper function
getIconAndLoadingStatus
to return necessary values without having to mutate any variables.The returned values are then destructured into initialIcon and isLoading, which are used to set the state.Issues Resolved
Fixes #1167
Check List
yarn lint
yarn test-unit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.