refactor: improve useVisitorData mount fetch and request-source handling#199
Draft
erayaydin wants to merge 8 commits into
Draft
refactor: improve useVisitorData mount fetch and request-source handling#199erayaydin wants to merge 8 commits into
erayaydin wants to merge 8 commits into
Conversation
Use `@fingerprintjs/eslint-config-dx-team@2.0.0` which requires ESLint v10. Related-Task: INTER-2222
Contributor
Coverage report
Show files with reduced coverage 🔻
Test suite run success23 tests passing in 15 suites. Report generated by 🧪jest coverage report action from 8b73326 Show full coverage report
|
Member
Author
|
Moving the PR to draft since we're planning to upgrade |
…inter-2222 # Conflicts: # package.json
…nd remove deprecated files
3 tasks
60426e1 to
eb3a7a7
Compare
…ter-2222 Fold PR #201 into this branch and keep the unique useVisitorData refactor.
Contributor
pnpm exec changesetto create a changeset. |
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.
useVisitorDatato trackgetVisitorDatain config state, re-enter loading when the request source changes, and fetch on mount without areact-hooks/set-state-in-effectdisableDiscussion point: mount fetch path
Mount now calls
currentGetVisitorDatadirectly instead of going throughgetData(). That avoids the synchronous setState-in-effect lint, but means mount success/error handling is duplicated withgetData. Prefer this, or a shared helper?Note: merge order
Land #201 first; this PR is the follow-up called out in that merge plan.