Hi Stuart,
Components are records in order to support the dependency-injection
features of `component/start-system`, which work via `assoc`.
That was the only reason that I could imagine but I wanted to double
checked here :) I'm always inclined to think in performance reasons that I
don't
Hi Juan,
Components are records in order to support the dependency-injection
features of `component/start-system`, which work via `assoc`.
There are potentially many other ways to do dependency injection, but I
found `assoc` to be practical.
If you want to create a component that has a
Hi guys,
I'm just wondering the pros/contras that justify to choose defrecord vs
reify as component fn constructor.
in the component README we can read
To create a component, define a Clojure record that implements the
Lifecycle protocol.
Yes I know that defrecord creates an immutable
Often because components contain some form of data. For instance, a
component that handles database connection may have a database connection
instance.
Reify produces objects that are essentially opaque, which is fine if you
just want their behaviour, as in the case of Om, but not so good if you
Hi James
I got this question after watching the David Nolen's video called The
Functional Final Frontier
https://www.youtube.com/watch?v=DMtwq3QtddYfeature=youtu.bet=663.
Around minute 11th he talked about Local state is poison
https://awelonblue.wordpress.com/2012/10/21/local-state-is-poison/