1.0.10 • Published 11 months ago

react-internet-connectivity v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Internet Connectivity Checker

This is a simple React component that checks for internet connectivity using the react-internet-connectivity hook.

Code

import React from 'react';
import { useInternetConnectivity } from "react-internet-connectivity";


function TestComponent() {
    // Use the useInternetConnectivity hook to check if the user is online
    const isOnline = useInternetConnectivity();

    return (
        <div>
            <h1>Internet Connectivity Checker</h1>
            {/* Display online/offline status based on the isOnline value */}
            <p>{isOnline ? "You are online!" : "You are offline!"}</p>
        </div>
    );
}

export default TestComponent;

Made with ❤ by CalmRay

1.0.10

11 months ago

1.0.9

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago