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

State is not updating using setState in geolocation function #277

Open
Ehsan5g opened this issue Oct 19, 2023 · 0 comments
Open

State is not updating using setState in geolocation function #277

Ehsan5g opened this issue Oct 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Ehsan5g
Copy link

Ehsan5g commented Oct 19, 2023

Environment

I used Geolocation.getCurrentPosition , but my state is not updated

code :

Geolocation.getCurrentPosition(
            (position)=> {
              console.log(position);
              setLocation(position);
            },
            undefined,
            {
              maximumAge: 0,
              timeout: 5000,
              enableHighAccuracy: true,
            },
          );

Platforms

Versions

  • Android:
  • iOS:
  • react-native-geolocation:
  • react-native:0.68.2
  • react:17.0.2

Description

Reproducible Demo

@Ehsan5g Ehsan5g added the bug Something isn't working label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant