What is Baahu?
Baahu is a small zero-dependency Moore machine-based UI framework for Javascript + TypeScript
Features
- Faster and smaller than major frameworks/libraries (Svelte, Preact, Vue, React, and Angular)
- Built-in robust state management: Finite State Machines!
- Event-driven, not change-driven/reactive
- Built-in trie-based router & code-splitting
- First-class TypeScript support: type-checked JSX, props, states, events.
- O(1) component rendering for all components, not just leaves.
Get Started
Everything you need to know about Baahu is in the docs!
Try it out live on Code Sandbox!
Example Components
You should read the docs, but if you want a sneak peek at what the API looks like, here a couple of example components:
Toggle
; ;
Traffic Light
A traffic light component that doesn't let you cross the street when it is red, and displays the # of times you crossed the street.
; /** returns a function that is called by baahu. emit the * provided event after the specified time */ /** * you can make your own abstractions like `delayedEmit` * for entry/exit/"do" actions. * * embracing js/ts (as opposed to shipping with every * possible abstraction) keeps baahu fast and light! */ ;