fix(productView): key causes refresh #1264
Merged
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.
What's included
refactor(productView): simplify, unnecessary hookNotes
simplifies the product view component by removing the no longer necessaryuseCallback
this was done because of routing overlap betweenswatch
andsubscriptions inventory
align to authentication component, consistencyfix
for thekey
being used on the provider... we realized unnecessary view refreshes were happening because the key aligned toproductID
instead ofproductGroup
... updating toproductGroup
removed the refresh issue (and removing also works)... then we realized the hook itself might not be necessary...useCallback
is still necessary after testing... the original routing configs are still being applied in production... the ideal fix is here once consoledot corrects the routing... https://github.com/cdcabrera/curiosity-frontend/tree/20240130-productview-idealsolutionHow to test the lesser change
Coverage and basic unit test check
$ npm install
$ npm test
Check the build
$ npm install
$ npm run build
How to test the intended change
Coverage and basic unit test check
$ npm install
$ npm test
Local run check
$ npm install
$ npm start
Proxy run check (FAILED, reverting to lesser update fix instead, intended change is linked above)
$ npm install
$ npm run start:proxy
usage
the issue may no longer exist... but if someone forgot to remove the old routing configs...)Check the build
$ npm install
$ npm run build
Example
...
Updates issue/story
ongoing