# What's Unifire?

Unifire is a state management solution that's tiny, efficient, capable, and easy.

# Features

  • Tiny 410 (brotli-compressed) bytes. No dependencies.
  • Simple Including the constructor, Unifire has five public methods and one public property.
  • Efficient Unifire only calls a subscriber when one of its dependencies changes.
  • Derived State Store-level computed properties have never been easier.
  • Unopinionated Actions Combine sync and async mutations in a single action. Unifire will call the right subscribers at the right time.
  • Automatic Baching By intelligently batching state updates, Unifire calls your subscribers only when absolutely necessary.
  • Code Splitting Register additional store modules at runtime.
  • Framework-Agnostic Unifire works with anything. See the Integrations docs for pre-made framwork integrations.
  • Flexible Unifire and its framework integrations provide explicit support for both single-store global setups and per-component one-off stores.
  • Extensions Unifire is easy to extend. Check out the extensions docs for available modules.

# Influences

Any new library is informed by the greats that came before it. Unifre is no different.

# Vuex

The Vuex team did an incredible job ensuring that stores written using Vuex are readable. Its API is straightforward and declarative. If you're familiar with Vuex, you'll see it's influences on Unifire's API right away, especially in Unifire's constructor and actions.

# Mobx

I've always been impressed by Mobx's ability to yield beautiful, simple user-written code. Mobx has mastered the art of abstracting complexity away from the user. You never have to tell Mobx what your dependencies are--it knows. This mentality informed Unifire's subscribe method and unifire-preact's Observer HOC.

# Unistore

Jason Miller's work to simplify the path to async actions while preserving a familiar API is awesome. More than anything, though, I benefited from reading Unistore's source code. unifire-preact's Observer HOC has a couple of Jason Miller classics in it.

# Storeon

You won't find a smaller state management system with more features than Storeon. It's pure wizardry. I referenced Storeon's code regularly as I wrote unifire-preact's hooks.