@ibnlanre/portal is a state management library designed to bridge the gap between simple state hooks and complex state machines. It provides an intuitive, type-safe approach to state management that grows with your application's needs.
Whether you're building a small React component or a large-scale application, @ibnlanre/portal adapts to your needs without forcing specific architectural patterns or unnecessary complexity.
For projects that don't use a package manager (e.g., simple HTML pages or online playgrounds), you can include @ibnlanre/portal from a CDN:
A store is an object that holds your application's state. It allows you to read the state, update it, and subscribe to changes. @ibnlanre/portal stores can hold any kind of data, from simple primitive values to complex, nested objects.
@ibnlanre/portal distinguishes between two main types of stores, created automatically based on the initial state you provide: