We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import React from "react"; import { useGeolocated } from "react-geolocated";
const Demo = () => { const { ccords, isGeolocationAvailable, isGeolocationEnabled } = useGeolocated({ positionOptions: { enableHighAccuracy: false, }, userDecisionTimeout: 5000, });
return !isGeolocationAvailable ? ( <div>Your browser does not support Geolocation</div> ) : !isGeolocationEnabled ? ( <div>Geolocation is not enabled</div> ) : coords ? ( <table> <tbody> <tr> <td>latitude</td> <td>{coords.latitude}</td> </tr> <tr> <td>longitude</td> <td>{coords.longitude}</td> </tr> <tr> <td>altitude</td> <td>{coords.altitude}</td> </tr> <tr> <td>heading</td> <td>{coords.heading}</td> </tr> <tr> <td>speed</td> <td>{coords.speed}</td> </tr> </tbody> </table> ) : ( <div>Getting the location data… </div> );
};
export default Demo;
correct the const ccords -> coords
The text was updated successfully, but these errors were encountered:
fix(readme): fix typo in sample code
fa6c20d
There was a typo in the readme code making the code invalid. Fixes #1062
Hi @ayushkedia05 thank you for reporting this! :) Fix is on the way.
Sorry, something went wrong.
🎉 This issue has been resolved in version 4.0.2 🎉
The release is available on:
Your semantic-release bot 📦🚀
Successfully merging a pull request may close this issue.
import React from "react";
import { useGeolocated } from "react-geolocated";
const Demo = () => {
const { ccords, isGeolocationAvailable, isGeolocationEnabled } =
useGeolocated({
positionOptions: {
enableHighAccuracy: false,
},
userDecisionTimeout: 5000,
});
};
export default Demo;
correct the const ccords -> coords
The text was updated successfully, but these errors were encountered: