
UI With fp-ts
A tiny-tiny UI library that uses JSX and fp-ts to make for easy, small UIs.
Elm-like Style
Every ui-ts application is built with the following building blocks:
- A
Statetype, which holds the global state of the application - An
Eventtype, which represents the different possible events that may occur (usually withts-adt) - An
initialvariable, which is the initialStateof the application - A
renderfunction, which takes the current state and atriggercallback, and returns the HTML to render to the screen (using JSX) - An
updatefunction, which returns a new state based on the previous state and an event
Calling UI.createApp with all of these returns an App, which can then be run with UI.runApp or UI.runWithRoot.
Get Started
You can use the CLI to initialize a new ui-ts project, using npx ui-ts.