4 ms·
Can you tell me what clojure libraries/frameworks work the way you describe? I'm learning clojure and would like to build some toy web apps because I've never d
by mark_edward 10y ago
Can you tell me what clojure libraries/frameworks work the way you describe? I'm learning clojure and would like to build some toy web apps because I've never done webdev before.
- vectorjohn 10y agoSounds like they're referring to hiccup.
- fnordsensei 10y agoStart with Figwheel[1] to enable hot-loading code and live reloading: lein new figwheel <app-name> I have used Reagent[2] since I'm only doing prototypes and don't have to worry about production quality. Om/Om Next[3] seems like it would be worth checking out since it does a bunch of clever things that Reagent doesn't. Reagent is very straightforward and therefore might be the better starting point, seeing as you're just starting out. Like the sibling comment pointed out, Reagent uses Hiccup-style data structures to represent HTML. Om can be configured to do the same, but doesn't out of the box last time I checked. Either way, the Hiccup syntax looks like this: [:div [:h1 "Hello world"]] It's just regular arrays with symbols, strings and what-have-you, meaning you can construct them using standard Clojure functions in any way you see fit. Add either Reagent or Om to your project.clj, and off you go. [1]: https://github.com/bhauman/lein-figwheel https://github.com/bhauman/lein-figwheel [2]: https://github.com/reagent-project/reagent https://github.com/reagent-project/reagent [3]: https://github.com/omcljs/om https://github.com/omcljs/om
- serpix 10y agoAll you need is re-frame. It is well documented and the philosophy is explained as well.
- fnordsensei 10y agoThanks for the tip, I enjoyed their comprehensive readme. I might give this a go next time around. https://github.com/Day8/re-frame https://github.com/Day8/re-frame
- bschwindHN 10y agoDefinitely try it sooner rather than later, it's good stuff. I feel like re-frame is what you would get if you put the time into selecting the best libraries to integrate with React, and then removed as much boilerplate as possible.