Skip to content

Instantly share code, notes, and snippets.

View SuzaBr's full-sized avatar

Suza SuzaBr

View GitHub Profile
@SuzaBr
SuzaBr / OfflineNotice.tsx
Last active December 1, 2022 07:47 — forked from Chiamaka/OfflineNotice.js
Rewrite OfflineNotice.js to tsx. NetInfo is deprecated since react-native 0.60. Switch to community version.
/**
* @file Offline notice, responsive to network changes.
*
* @author Chiamaka Nwolisa
* @author SuzaBr
*
* See: https://medium.com/dailyjs/offline-notice-in-react-native-28a8d01e8cd0
* Adapted for community version netinfo, see: https://reactnative.dev/docs/0.60/netinfo.
* Adapted for TypeScript.
*