As outlined in this JIRA ticket, when previously upgrading to a newer version of eslint-config-airbnb, some errors relating to the re-rendering of components were highlighted in several different files.
This PR aims to implement the use of the React useMemo hook to prevent the unnecessary component re-renders, solving the errors, and improving performance as a result.
Code changes
useMemo hook imported and wrapped around component objects in the following files:
Manually tested by running the yarn && yarn test:lint command before and after the hook was implemented in each component to check that the errors for each file had been resolved.
Resolves JIRA [1216]
Overall changes
As outlined in this JIRA ticket, when previously upgrading to a newer version of
eslint-config-airbnb
, some errors relating to the re-rendering of components were highlighted in several different files.This PR aims to implement the use of the React
useMemo
hook to prevent the unnecessary component re-renders, solving the errors, and improving performance as a result.Code changes
useMemo
hook imported and wrapped around component objects in the following files:We ended up having to do the same inside of these tests files below as well:
Testing
yarn && yarn test:lint
command before and after the hook was implemented in each component to check that the errors for each file had been resolved.Helpful Links