finds.dev← search

// the find

jaredpalmer/the-platform

★ 4,370 · TypeScript · MIT · updated Dec 2022

Web. Components. 😂

A grab-bag of React hooks and Suspense-friendly components that wrap browser Web APIs — device motion/orientation, geolocation, network status, media queries, and lazy-loading primitives like <Img>, <Script>, and <Stylesheet>. Aimed at React devs who wanted an early, playful look at what Suspense could do with real browser APIs rather than just data fetching.

The scope is narrow and the hooks map cleanly 1:1 to native browser APIs, so there's no abstraction tax if you already know the underlying Web API. Using Suspense for resource loading (scripts, stylesheets, images) was a genuinely interesting idea at the time and the <Script>/<Preload> components show a real use case beyond data-fetching demos. Small, readable source files per hook/component make it easy to just copy the one you need instead of adding the dependency.

Dead project — last push December 2022, and it depends on throwing promises for Suspense, an unstable React internal pattern that was never finalized and is incompatible with concurrent React / React 18's Suspense semantics. It vendors react-cache from Facebook's own experimental (and abandoned) cache implementation, which is a sign of how shaky the foundation is. No TypeScript strictness shown beyond .tsx extensions, test coverage is thin (two test files for ~10 hooks/components), and several APIs (useDeviceMotion/useDeviceOrientation) are deprecated or restricted behind permission prompts in modern browsers with no handling for that in the code.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →