This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (20)
- # boot (7)
- # cider (115)
- # cljsrn (13)
- # clojars (1)
- # clojure (122)
- # clojure-italy (23)
- # clojure-spec (60)
- # clojurescript (74)
- # data-science (7)
- # datomic (26)
- # emacs (8)
- # graphql (1)
- # lumo (26)
- # music (1)
- # off-topic (1)
- # re-frame (9)
- # ring (3)
- # rum (1)
- # spacemacs (4)
- # uncomplicate (6)
- # vim (7)
Let’s say I’m running a Clojure backend, rather than a cljs/node one. How would I go about doing server side rendering with Reagent? Nashorn seems uncomfortable with the JS generated by cljs. Would I have to run a Node instance on the side and pass the task along to it?
@henrik the example uses nashorn https://github.com/reagent-project/reagent-cookbook/tree/master/recipes/reagent-server-rendering
I had a look at that, tried to get Nashorn to parse
base.js as an experiment, and it started complaining about the code style. That, along with stuff like this
(str "reagent_server_rendering.core.main('" page-id "');") in the templates made me think that maybe it wasn’t the best/most mature option.
The current idea is to use Node as a rendering layer between Clojure/API and CloureScript/Frontend.
@robert-stuttaford Indeed, which is awesome. I’m not looking at Reagent specifically necessarily, just a generic way of pre-processing arbitrary JS.
Clojure backend, advanced-compiled cljs frontend, sharing .cljc source with the Rum defcs in it
Yeah, indeed! It’s annoying to know that there is one embedded in JVM, but that it’s kind of slow and finicky.
I've moved these libraries into package.json and now got an error on react-native-packager start with optimizations :none : No such module 'path'. But with optimizations :simple all works.
and, of course, this doesn't work with figwheel because figwheel requires only optimizations :none
@pesterhazy I'm just trying to perfom @dnolen's request to give a try for clojurescript master and to move all node dependencies into project.clj. And in this case there is no need to add modules into .re-natal
Also I really want to port Pedestal's routing lib to cljs as well. It's the best thing i used for routing
I’ve played with it briefly, and it’s great. I think there’s a general push towards .cljc for Pedestal.
base on pedestal , my goal is to replace secretary with pedestal routing on client side as well
which one is a better practice (i have 2 async channel for websocket in/out) ? 1) Returning async channels from a functions and pass them around 2) use global vars for async channels and require them on demand ?
@lxsameer what is a better practice? 1) returning values from functions 2) using global vars/atoms and referencing them on demand?
I do have another event-handler hooked to the "plz" and "ort" input elements. They work.
@magra you might be running into a weird issue where closure optimizes the call away incorrectly
Hello. I've been playing around with datomic recently, and I'm interested in using datomic for an application with a frontend written in clojurescript. As far as I can tell, datomic.client doesn't support CLJS. I was kind of hoping for a solution that would basically let me deal with clojure data all the way through, without having to write, say, a rest frontend for my queries. What is the best way of going about this(AFAIK, the rest interface for datomic has been deprecated, so I'd rather not use that)
@sbrg Disclaimer: I am new to ClojureScript and haven’t been looking into it much, but I am also experimenting with Datomic as so stumbled upon a few solutions
I had seen datascript, but as far as I could understand it was for directly interfacing with datomic. But I'll take a look at the links, thanks!
@sbrg as far as I know any interfacing between a frontend and datomic is very much experimental at this point
I see. It just seems so .. perfect to be able to speak to datomic directly from the frontend. But it looks like precursor has a pretty nice setup going with datomic + datascript + sente for real-time updates
@sbrg there are a lot of security implications that you have to consider. But Datomic’s filters and transaction log makes it much easier to do this (as shown by precursor)
i’m seeing a behavior difference with
int in clj/cljs:
(int \a) ; 97 in java land (int \a) ; 0 in js land
Yea, saw that. Ok. I guess I'm stuck with reader conditionals to stay cross platform. Thanks!
@bspaulding I’m not familiar with Clojurescript though, there might be a better answer than this!
So basically, if I am not mistaken,
(int \a) in ClojureScript is the same as
"a" | 0 in js
core.match I'm getting
var undeclared warning when using variables in the match.