rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
2018-03-01T20:26:51.000695Z

@amarjeet looks you are performing http req in :will-mount which is executed only once, when component is mounting into the DOM

2018-03-01T20:27:21.000210Z

also generally it’s not a good idea to perform IO within components or their lifecycle methods

amarjeet 2018-03-01T20:27:54.000453Z

oh okay

amarjeet 2018-03-01T20:29:18.000409Z

my use-case is that I want to fetch books for certain category from my db (server). this should happen, when a user selects a category on the web page - this should trigger an http call to fetch data, sending selected category as parameter

amarjeet 2018-03-01T20:29:44.000548Z

Is there any other way to make it happen?

amarjeet 2018-03-01T20:30:45.000392Z

and after user selects the category - the results should be shown right after

2018-03-01T20:33:26.000179Z

do it in :on-click handler for example

amarjeet 2018-03-01T20:34:53.000509Z

hmm, that might be a good idea

amarjeet 2018-03-01T20:34:58.000226Z

let me try this

amarjeet 2018-03-01T21:01:34.000117Z

@roman01la yes, this is a better way. thanks πŸ™‚

πŸ‘ 1