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

react.low-level

v1.0.0

Published

Use React to write beautiful interfaces for low power devices

Downloads

5

Readme

react.low-level logo

React.LowLevel

Use React to write beautiful interfaces for low power devices

Coming soon

This project is yet too young to show anything. Please follow project for more updates which comes soon.

Description

React.LowLevel is a framework that empowers developers to create impressive user interfaces on low-power and small CPU devices, including platforms like Arduino, ESP32, and similar hardware. With React.LowLevel, it becomes possible to seamlessly connect LCD, TFT, e-ink, and other display types, facilitating the rendering of various UI elements such as gauges, buttons, and tables. This framework excels at enabling the development of multi-panel, multi-page applications with remarkable ease.

What sets React.LowLevel apart from React Native is its unique capability to establish direct communication with the C programming language. This enables developers to embed C code directly into React components, facilitating direct control over hardware interactions and offering opportunities for low-level optimizations. This integration with C empowers developers to harness device-specific functionalities and maximize performance on these resource-constrained devices.

Example of component (VIP):

import { useState } from 'react';
import { TFT, Text, GPIO } from 'react.low-level';
import { Pins } from 'react.low-level/arduino'

const App = () => {
    const [ticks, setTicks] = useState();

    return (<>
        <TFT pins={{
            CS: Pins.D10,
            CD: Pins.D9,
            reset: Pins.D8
        }}>
            <Text>{ticks}</Text>
        </TFT>
        <GPIO mode="button" pin={Pins.D1} onPress={() => setTicks(ticks + 1)}>
    <>);
}

(Some nice screenshots would go here...)

How does it work

React.LowLevel enforces a constrained subset of TypeScript for writing React code, disallowing the usage of types like any or unknown among some other features. This disciplined approach ensures code can be transpiled into C with some extra addons such as closures. The TypeScript code is then analyzed and transpiled into C, allowing it to be consumed with standard C tooling. Notably, React.LowLevel itself, including the event loop and many components, is written directly in C and imports only the necessary modules. This approach significantly reduces the requirements for RAM, ROM, and CPU resources.

However, it's important to note that certain features of React and many TypeScript/JavaScript functionalities are not available in React.LowLevel. For instance, changing prototypes, exceptions (as of now), React.Suspense, and React server-side components are among the features that are not supported.

Further details on the inner workings of React.LowLevel will be provided at a later stage, offering a deeper understanding of its functionality and capabilities.