Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite loop location api #787

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Fix infinite loop location api #787

merged 1 commit into from
Aug 15, 2024

Conversation

tim-lin-bbpos
Copy link
Collaborator

Summary

Fix infinite loop location api

Motivation

Using useEffect with multiple dependency might cause infinite loop as here.
And also js is using Object.is to compare diff instead of the real content, so sometime what we think is the same isn't.
The solution is to break single useEffect into two for now to avoid nested update trigger loop.
Reference: https://bugs.bbpos.com/browse/SDK-219

Testing

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

@nazli-stripe nazli-stripe merged commit 6e63892 into main Aug 15, 2024
3 checks passed
@tim-lin-bbpos tim-lin-bbpos deleted the bbpos/location-loop branch August 21, 2024 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants