Number one this week, React Adaptive Loading Hooks is a collection of React hooks to get data about the network connection and the device hardware.
It can help create applications that “adapt” to the environment, by delivering content that depend on the network conditions.
For example, a component could load a video if the network connection is fast (4G) or a small image if it’s a low-speed connection.
Unfortunately the browser support is currently limited.
Similar hooks are provided by the following libraries:
useNetworkStatus()
from The PlatformuseNetwork()
from react-use
If you only need to check whether the user is online or not you could use React Detect Offine library. It works by calling the Online and offline events API or doing “polling” if the API is not available in the browser.
Growing Fast This Week
1 | React Adaptive Loading Hooks Deliver experiences best suited to a user's device and network constraints | GitHub | +19.2% | |
2 | BullMQ Premium Message Queue for NodeJS based on Redis | Homepage | +15.9% | |
3 | Dark Mode Switch Add a dark-mode theme toggle with a Bootstrap Custom Switch | Homepage | +12.0% | |
4 | Keystone A scalable platform and CMS to build Node.js applications | Homepage | +8.2% | |
5 | swr React Hooks library for remote data fetching | Homepage | +7.3% | |
6 | TinaCMS A site editing toolkit for modern React-based sites (Gatsby and Next.js) | Homepage | +6.7% | |
7 | React Hook Form React hooks for forms validation without the hassle. | Homepage | +6.5% | |
8 | DPlayer Wow, such a lovely HTML5 danmaku video player | Homepage | +6.4% | |
9 | React Query Hooks for fetching, caching and updating asynchronous data in React | GitHub | +5.2% | |
10 | Redux Starter Kit The official, opinionated, batteries-included toolset for efficient Redux d... | Homepage | +5.2% |
Trending This Week
1 | 30 seconds of code A curated collection of useful JavaScript snippets that you can understand ... | Homepage | +656 ★ | |
2 | React Adaptive Loading Hooks Deliver experiences best suited to a user's device and network constraints | GitHub | +518 ★ | |
3 | freeCodeCamp The https://www.freeCodeCamp.org open source codebase and curriculum. Learn... | GitHub | +503 ★ | |
4 | VS Code Visual Studio Code | Homepage | +501 ★ | |
5 | Algorithm Visualizer Interactive Online Platform that Visualizes Algorithms from Code | Homepage | +487 ★ | |
6 | DPlayer Wow, such a lovely HTML5 danmaku video player | Homepage | +458 ★ | |
7 | You Don't Know JS A book series on JavaScript | GitHub | +449 ★ | |
8 | Vue.js A progressive, incrementally-adoptable framework for building UI on the web | Homepage | +414 ★ | |
9 | Vue Element Admin A magical vue admin | GitHub | +411 ★ | |
10 | React A declarative, efficient, and flexible JavaScript library for building user... | Homepage | +395 ★ |
Any question or feedback? Reach us on GitHub.
Best of JavaScript is a project created by Michael Rambeau, made in Osaka, Japan.