SHIFT + D

Factories

Updated on August 22, 2024Source code

In Baleada Logic, every factory is a factory function, i.e. a function that returns an object.

Baleada Logic's factories have one additional characteristic: all of the object's properties are functions. If/when these functions share state, the state is kept private inside the factory, and it's not intended for public consumption or observation.

In terms of utility, factories fall in between classes and pipes & links. They follow functional programming principles like pipes and links, but similar to classes, they're less reusable and composable, and their functionality isn't tree-shakeable.

For a complete list of available factories, see the Factories section under the Logic heading in the left sidebar.

LinksGraph

Edit doc on GitHub

ON THIS PAGE

Factories