Skip to content

Commit f77f65e

Browse files
Enrich snippet
1 parent 862dbb6 commit f77f65e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ import { LocationContext } from '@aboutbits/react-toolbox'
143143
const MyComponent = () => {
144144
const { location } = useContext(LocationContext)
145145

146-
return null
146+
return location
147+
? <div>Your location is: {location.coords.latitude}, {location.coords.longitude}</div>
148+
: <div>Unable to get your location</div>
147149
}
148150
```
149151

0 commit comments

Comments
 (0)