[WS-2211][SPIKE] UAS Activity reliability strategy using Tanstack Query#13934
Draft
[WS-2211][SPIKE] UAS Activity reliability strategy using Tanstack Query#13934
Conversation
andrewscfc
reviewed
Apr 23, 2026
|
|
||
| export default loadable( | ||
| () => | ||
| import( |
Contributor
There was a problem hiding this comment.
ah will this ensure lazy loading of tanstack?
Member
Author
There was a problem hiding this comment.
Yes, I updated both the SaveArticleButton and QueryContext to be lazy loaded for that reason. We'll double-check that in the preview environment before moving forward.
jinidev
reviewed
Apr 24, 2026
jinidev
reviewed
Apr 24, 2026
elvinasv
commented
Apr 24, 2026
| }); | ||
|
|
||
| const persister = createAsyncStoragePersister({ | ||
| storage: typeof window !== 'undefined' ? window.sessionStorage : undefined, |
Member
Author
There was a problem hiding this comment.
Note: We could also use localStorage instead. With the sessionStorage the state would be out of sync if two tabs are opened (since tabs/windows have different session scope.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves JIRA: https://bbc.atlassian.net/browse/WS-2211
Summary
This pull request introduces TanStack Query v5 to manage server state for UAS (User Account System) save status, including query persistence and improved mutation handling
Associated SPIKE document with more details: https://www.dropbox.com/scl/fi/rg7qzngkl4pimk29psrsq/UAS-Activity-API-Client-Side-Reliability-Strategy-Spike.paper?rlkey=pm5qguvnl6lp56s07oh32opsm&dl=0
Testing instructions:
https://github.com/bbc/simorgh-infrastructure/blob/create-doc-on-UAS-testing-locally/documentation/testing-simorgh-uas-endpoints-locally.md