📄️ Atom
Atomic State
📄️ Action
Atom is the core of the atomic state. It allows creating an object that stores an autonomous micro-state, observable by anything—whether a widget or a function. However, an Atom could be modified by anything, anywhere, leading to classic side-effect problems. To address this, we removed the state setter and added AtomAction. This ensures that while an Atom can be listened to by anything, it can only be modified in a specific place, enhancing predictability and reducing uncontrolled side effects.
📄️ Selector
Managing state distribution and converging multiple states into a new one was a major challenge in the case study that led to the creation of ASP. We introduced a very simple way to combine multiple Atoms and compute a new value whenever any of them changes, using AtomSelector.
📄️ Hooks
Hooks are special functions that allow a component to connect to the lifecycle of a widget.