Fork me on GitHub
#re-frame
<
2017-04-02
>
souenzzo00:04:43

Hi There is some reason to not explicit the state like redux? (get state from props ...)

mikethompson04:04:28

@rb1719 Just to be clear (slurp "") will read the single HTML file (and not anything loaded by that HTML, like CSS or JS etc ... so I guess I'm pedantically pointing out that slurp won't get the website, just one file) ... the equivalent in the browser will be something from Google's Closure library: https://google.github.io/closure-library/api/goog.net.XhrIo.html See how to use it here: https://groups.google.com/forum/#!topic/clojurescript/_Ck1dGzDPzY or perhaps the more modern https://google.github.io/closure-library/api/goog.net.FetchXmlHttp.html

mikethompson04:04:39

BUT forget the lowlevel above, you are probably better using a library like cljs-ajax

mikethompson04:04:34

@souenzzo within re-frame we don't put state into components .... all state is stored in app-db. This state is obtained via subscribe. In addition, state can also be provided in props ... but such values are obtained as functional parameters