1.0.4 • Published 4 years ago

react-use-origin-location v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

React useOriginLocation

Intro

Simple hook to get the original location of your site. End of using annoying window.

Installation

First, add useOriginLocation to your project.

$ yarn add react-use-origin-location
or
$ npm install --save react-use-origin-location

Usage

useOriginLocation returns an origin location of your site.

import useOriginLocation from 'react-use-origin-location';

const MyComponent = () => {
    const location = useOriginLocation();
    return (
        <div className="MyApp">
            {console.log(location)}
        </div>
    );
};

export default MyComponent;

License

MIT License of course.

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago