-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
This would return the NetworkInformation interface from this: rsm-hcd/AndcultureCode.JavaScript.Core#101
Proposed hook could look something like this:
const useNetworkInformation = (): NetworkState => {
const [networkState, setNetworkState] = useState<NetworkState>({
isOnline: true,
});
useEffect(() => { /* add and remove connection change handler */ }, []);
return {
...networkState
}
};
brandongregoryscott
Metadata
Metadata
Assignees
Labels
No labels