Fork me on GitHub
#keechma
<
2020-10-27
>
fsd18:10:55

Hello @mihaelkonjevic, I need help with Keechma.next. I am trying to figure out how the data is being passed in Keechma next.

mihaelkonjevic18:10:16

@singhamritpal49 hey, I’m not sure I understand the question, do you have an example I could take a look at?

fsd18:10:27

Thanks for getting back, I am new to Keechma. I recently started using clojurescript and heard about Keechma.next. In my background, I've mostly used React Javascript and In React.js you can pass down information from one component to another as props. I have been looking at examples at https://keechma.com/annotated/. It is not making sense to me. How is the information being pass down to child components? I went through the documentation, in my understanding Controller Manager is for making API calls. How do you pass this information that you fetched from API to other components? Are there any video tutorials on this framework?

mihaelkonjevic18:10:14

If you’re starting with Keechma right now, I would recommend you to start with keechma/next which is a new version of the framework. Docs can be found here https://github.com/keechma/keechma-next For passing data to props, you would use subscriptions which subscribe to the state of the controller. You can find the RealWorld app example here https://github.com/gothinkster/clojurescript-keechma-realworld-example-app Controllers map can be found in this file https://github.com/gothinkster/clojurescript-keechma-realworld-example-app/blob/master/src/app/app.cljs and here’s an example how to get data from a controller to the component https://github.com/gothinkster/clojurescript-keechma-realworld-example-app/blob/master/src/app/ui/pages/article.cljs#L66

mihaelkonjevic18:10:49

Site is not updated yet, so all examples are for the classic version of keechma which is still working, but keechma/next should provide simpler and more streamlined experience

🙌 3
fsd18:10:30

Thank you so for that information Miheal. This information will help me significantly to get started with Keechma 🙂.

mihaelkonjevic20:10:59

No problem, let me know if I can help you anyhow

👍 3
fsd18:10:21

Hi Miheal, I had another question,

use-sub props :article 
What does this use-sub keyword do?
Is this something from Keechma internal?

mihaelkonjevic13:10:11

Yeas, this will subscribe to the controller state. This is the controller in question which loads data for the article and exposes it to the UI layer https://github.com/gothinkster/clojurescript-keechma-realworld-example-app/blob/master/src/app/controllers/article.cljs

fsd18:10:04

Got it Thanks