npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@onehat/ui

v0.3.375

Published

Base UI for OneHat apps

Downloads

594

Readme

OneHatUi Patterns

The OneHatUi library is a set of pre-built components that make use of the OneHatData library. It is built on top of ReactNative, and either NativeBase or GlueStack.

Many of the components make use of other components internally. For example, the Grid component uses IconButtons for its pagination toolbar. The Combo component makes use of the Grid component for its menu. And the Tag component is simply a Combo with additional functionality.

Many components have “regular” and “editor” versions. For example, there’s a Grid and a GridEditor. The Grid is simply for viewing. The GridEditor allows the records within the Grid to be managed (add/edit/delete).

For the most part, it follows the React rules of data flowing only top-down through props, and of components not knowing about their relative position in the component tree. But there are some cases where such wooden adherence is counterproductive. In such cases, the library makes use of the withComponent HOC, which adds a “self” prop to every component, which has references to parents and children. In this way, a child component can directly reference its parent(s) or children.

For parentage examples, the Form component closes its grandparent Editor in some cases, and the InlineEditor queries its parent Grid to figure out which row it should align with.

For a child example, the Combo can directly tell its menu Grid to selectNext() or selectPrev() based on user keystrokes.