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

reverui

v0.6.1

Published

Effortless UI, Powerful Simplicity

Downloads

146

Readme

ReverUI

Effortless UI, Powerful Simplicity

  • 🔥 Similar to React
  • 🔑 TS Native 🔐 (But can be used with JS)
  • ❌ No Virtual DOM 📦
  • ❌ No compiler ⚙
  • 📦 Rever Router (Router for ReverUI)

Try out now

Current functionality:

  • [x] React-like JSX
  • [x] Good intellisense
  • [x] useSignal ♻
  • [x] useEffect (state changes & mounted)
  • [x] Fragments (<> </>)
  • [x] Custom Hooks (must start with "$use")
  • [x] Conditional Rendering (<$Show when={condition}/>) ❓
  • [x] Loop Rendering (<$For each={arr} element={() => {...}}>) 📜
  • [x] Event Handling (all events in lowercase) Click Key ...
  • [x] Compatible with Vite Plugins (TailwindCSS, ...) ✨
  • [x] Reusable Components (<$Component/>) 📦
  • [x] Smart Re-rendering 🧠

The project is built on top of Vite

This are the features that Vite provides:

  • JSX Parser (Configurable)
  • Typescript config
  • Bundler
  • HMR (Hot Module Replacement)
  • Support for CSS Preprocessors
  • Transpiler

Try it yourself:

There is a prepared Vite template ready to use that includes examples & TailwindCSS configured by default

Steps:

  • Clone the repository: git clone https://github.com/PiterWeb/ViteReverUITemplate.git
  • Open the folder & install the dependencies: npm install
  • Run the development enviroment: npm run dev

More Examples:

  • $useSignal:

    import { $useSignal } from "reverui";
    
    export default function StateFullApp() {
    	const mySignal = $useSignal("initValue");
    
    	return <div>...</div>;
    }
  • $useEffect:

    import { $useEffect, $useSignal } from "reverui";
    
    export default function StateFullApp() {
    	$useEffect(() => {
    		console.log("Mounted");
    	});
    
    	const counter = $useSignal(0);
    
    	$useEffect(() => {
    		console.log("Counter value changed to " + counter.value);
    	}, [counter]);
    
    	return <div>...</div>;
    }
  • Example Counter Component:

    import { $useSignal, $useEffect } from "reverui";
    
    export default function StateFullApp() {
    	// UseEffect with no dependencies before $useSignal will be called only on mount
    	$useEffect(() => {
    		console.log("Mounted");
    	});
    
    	const counter = $useSignal(0);
    	// const signal = $useSignal(initialValue);
    
    	// $useEffect with dependencies will be called only when the dependencies change
    	$useEffect(() => {
    		console.log("Counter value changed to " + counter.value);
    	}, [counter]);
    
    	return (
    		<div>
    			<h1>Stateful Component</h1>
    			<p>
                    Counter: 
                    <Show when={counter.value === 0} element={() => <span>"You didn't click"</span>} />
                    <Show when={counter.value !== 0} element{() => <span>counter.value</span>} />
    			</p>
    			<button onclick={() => counter.value++}>Increment</button>
    		</div>
    	);
    }