Go back to home page

Niue

A tiny shared state and event library for React

React
TypeScript

Niue is a tiny library for managing state and events in React. I built it after getting tired of having to create endless React contexts to hold bits of application state in projects I've worked on, but not wanting to use a traditional, overly complicated (for my purposes) state management library like Redux. Niue solves this problem by providing a simple API that's similar to React's Context API, but designed for holding state instead of just passing values. It also provides an easy way to create, broadcast, and receive custom events (which the state management part itself uses). Since making Niue, I've used it in multiple projects, including TruthTables here.