This repository has been archived on 2020-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
reactimal/README.md

39 lines
1.8 KiB
Markdown

# Reactimal
Reactimal is a set of tools that can be used to express your code as a logic graph using reactive
programming methods.
In computer science, we learn that a function is a process with some inputs and an output.
Imperative programming languages focus on constructing the operations that convert inputs to output.
Since a program is a collection of functions, there is inevitably shared state that the many
functions act on. In this situation, one value in the shared state could be updated through any
number of functions. The situation that causes this is called "spaghetti code" where code size grows
to the point such that it's difficult to understand the code path that each task takes through the
code base.
To avoid this situation, Reactimal maintains links to the whole logic graph so it's easy to see what
outputs come from what inputs.
Reactimal provides the following reactive programming primitives. Each type of primitive is
[subscribable](./subscribable.md) and provides a single output value, but differ in how they receive
their input. In short:
- A [property](./docs/property.md) directly receives a single value as an entry point to a logic
graph
- A [container](./docs/container.md) wraps javascript container objects and triggers an update when
a property changes.
- A [computed](./docs/computed.md) only receives values from other subscribables.
- A [stream](./docs/stream.md) is the asynchronous version of a computed.
Reactimal also includes a few [utilities](./docs/utilities.md) that may be useful when building logic
graphs.
## Inspiration
Reactimal is the result of years of learning from the following projects:
- [KnockoutJS](http://knockoutjs.com/)
- [Overture](https://github.com/fastmail/overture)
- [Redux](https://redux.js.org/)
- [Mithril](https://mithril.js.org/)