1.0.1 • Published 3 years ago

@jiho-hooks/use-coords v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@jiho-hooks/use-coords


React hook to find latitude, longitude, and latitude of radius around. When you enter an argument, it returns the latitude longitude east, west, south, and north that traveled to that distance.

Installation


yarn

yarn add @jiho-hooks/use-coords

npm

npm i @jiho-hooks/use-coords

Usage


import React from 'react';
import { useCoords } from './useCoords';

export default function App() {
  const { state, location } = useCoords();
  const { south, north, east, west } = location;

  console.log(state, south, north, east, west);

  return (
    <div className='App'>
      <h1>Hello</h1>
    </div>
  );
}

Arguments

ArgumentsTypeDescriptionRequired
distancenumberRadius distance you want to checkNo
1.0.1

3 years ago

1.0.0

3 years ago