d

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567
ouroffice@aware.com

 

KMF

React Hooks To Access Browser Navigator Properties

A set of React hooks to access browser navigator properties.

Use Cases:

  • Is there an internet connection?
  • What’s the location of the user?
  • What language(s) does the user’s computer support?
  • What kind of computer does the user use?

How to use it:

1. Import the useNavigator module.

import useNavigator from "react-browser-navigator";

2. Basic usage.

function App() {
  let { networkStatus } = useNavigator();
  return (
    <div>
      {networkStatus === true ? (
        <span>We are online!</span>
      ) : (
        <span>We are offline!</span>
      )}
    </div>
  );
}

Preview:

React Hooks To Access Browser Navigator Properties

Download Details:

Author: lineceptorg

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/lineceptorg/react-browser-navigator

License: MIT

Credit: Source link

Previous Next
Close
Test Caption
Test Description goes like this