Fork me on GitHub
#keechma
<
2020-12-23
>
fsd20:12:50

Hi @mihaelkonjevic and @tiborkr I am working on a Keechma built application. I see it has deps-state, meta-state, state in controller. Would someone please explain me, what that is?

mihaelkonjevic22:12:51

@singhamritpal49state* This is a read/write atom where controller stores it’s state. Other controllers that depend on a controller, are informed whenever this atom’s state changes (first, controllers are started or stopped based on the return value of its params function which will receive current state of all controllers listed in the :keechma.controller/deps vector and then the controller which were already running will receive :keechma.on/deps event where the payload will be a map with the changed deps). After the reconciliation is done, all UI subs (done via use-sub ) will be informed. Every controller can implement the derive-statemultimethod which allows you to return a value based on the state of the controller and it’s dependencies. Whatever is returned from the derive-state multimethod is controller’s publicly accessible value • meta-state* This is a read/write atom where controller can store its private state. This state is not visible to other controllers, but you can subscribe to it from the UI layer with the use-meta-sub fn. This atom is used for bookkeeping. For instance you might store AJAX request state in that atom. Changes to this atom’s value will not trigger reconciliation • deps-state* This is a read only atom like construct which will return the current values of controller’s dependencies when derefed.

fsd22:12:04

Hey @mihaelkonjevic Thanks so much for your response. I appreciate it. This clears a lot of things. Are there any video walk throughs for Keechma?

mihaelkonjevic22:12:27

Not at the moment, if I did one, what would be helpful for you?

fsd22:12:06

I pretty much understand how are components are built but I am still not sure on things like • Making API calls and storing the API response in entitydb • Understanding of Pipelines • Sharing information from controller to another

👍 3
mihaelkonjevic22:12:54

@singhamritpal49 Thank you. I’ll try to record something over the holidays

🙌 3
fsd22:12:40

@mihaelkonjevic thanks so much, that would be awesome!