This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-15
Channels
- # admin-announcements (10)
- # aws (2)
- # beginners (27)
- # boot (3)
- # cbus (4)
- # cider (1)
- # clara (6)
- # cljs-dev (3)
- # cljsrn (14)
- # clojure (98)
- # clojure-boston (1)
- # clojure-brasil (1)
- # clojure-czech (3)
- # clojure-dusseldorf (11)
- # clojure-greece (3)
- # clojure-japan (3)
- # clojure-korea (1)
- # clojure-russia (138)
- # clojure-uk (11)
- # clojurescript (76)
- # component (2)
- # core-matrix (1)
- # cursive (25)
- # data-science (3)
- # devcards (1)
- # euroclojure (4)
- # events (3)
- # funcool (1)
- # hoplon (219)
- # immutant (40)
- # juxt (8)
- # leiningen (1)
- # off-topic (34)
- # om (148)
- # onyx (10)
- # overtone (2)
- # proton (1)
- # re-frame (8)
- # reagent (3)
- # ring-swagger (5)
- # spacemacs (17)
- # untangled (47)
- # yada (19)
what other statements like debugger;
are there in Chrome? is there for example a statement that will just pause execution?
@borkdude: afaik, debugger
is the only one
hi guys, just starting with clojurescript and really need to clarify something.
I'm planning on making a multipage site instead of just a single page app, does that mean I will need to have multiple .cljs? e.g. index.cljs, about.cljs, profile.cljs?
Currently, I'm using Compojure for my routing
@robincarlo84: you don't have to, but you can
@robincarlo84: a single page app can also contain multiple pages. See for example: https://github.com/reagent-project/reagent-cookbook/tree/master/recipes/add-routing
@borkdude ah I see, thanks for clarifying. Will check that
is om closest to react + redux?
@bojan.matic: it has a single application state like Redux, I think the idea comes from Om
what does reagent do differently? or it doesn’t do state at all?
@bojan.matic: reagent doesn't care about where you store your state as long as you use a r/atom
if i were to start a clojurescript project now as a learning experience, which react binding lib would you recommend?
@bojan.matic: personally I would start with Reagent and then maybe look at Om or Rum
@bojan.matic: I think I'd recommend Reagent
is the react version baked into the library, how does that work? is it possible to make it use the newly released react 15?
@bojan.matic: Reagent depends on a jar cljsjs/react
which you can override yourself
all available versions can be found here: https://clojars.org/cljsjs/react
so, how would i override the version so that reagent uses the newer one?
@bojan.matic: personally I would just go with the defaults
you can specify it in :dependencies
in project.clj
. anything you specify yourself will take precedence over what other dependencies specify
But yes, @borkdude is totally right, go with the defaults first to avoid running into errors that haven't been ironed out yet
so the installed dependencies are flat for the whole project, ala python pip, there are no nested dependencies as in npm?
not a package manager 😄
@bojan.matic: the list of deps converts to a tree which you can see with lein deps :tree
— not sure if that's what you're asking
essentially dependencies are global, you can't load two versions of the same dependency at the same time
i’m asking would i end up with react 15 in top level and react 0.14 under the reagent level
@bojan.matic: if you specify react 15 as a dependency it will take precedence over react 14 from reagent and the reagent code will use react 15 as well
I don't know if Reagent is tested well against newer versions of React, but what could possibly go wrong
there are minor breaking changes, but mostly removal of deprecated stuff
but they are also removing creation of extra spans, and react-dataid attributes in the DOM
it sounds to me like not much should go wrong
Be sure to use the reagent 0.6.0-alphas when trying with react 15. BUT again, for learning it's probably best to stick with stable versions
Is it possible to only have one routing? In my case I want to have only the server side routing (Compojure) for my multipage site?
thanks all!
@robincarlo84: you probably want to build a classic web app and only enhance the html sent from the server with some js?
hey, does anyone know if it is possible to render a reagent component into resultant hiccup form?
I know render-to-string
, but that does render strainght into html
going through the sources right now, and i can't find anything like this
@karolmajta: I think the hiccup form is already in your code, before Reagent touches it
@karolmajta: it's just data
what if i have something like this:
(defn my-comp-a [] [:a "some link"])
(defn my-comp-b [] [:h1 [my-comp-a]])
my-comp-b is just data, but it has function in head position of [my-comp-a]
vector@karolmajta: if you change [my-comp-a] to (my-comp-a) you'll get what you want, but I don't think it's otherwise possible, because the result of my-comp-a generally depends on state
I'll try to render it into html, and then parse it back using hockory, we'll see what comes out of it
*hickory
I want to have that possible local state of components - so full top-down rendering is rather a no-go for me
hello all. could please let me know what is the usual go-to command or library for clojurescript http requests ?
I am trying to use react-bootstrap components using [react-bootstrap "0.28.1-1"]. The issue i am facing is with the usage of the Tabs. The initial render is as expected. However when any of the tab selection is done i get an error stating Uncaught TypeError: Cannot read property 'findDOMNode' of undefined. This happens only with the Tabs component. Any ideas?
@jouerose: this one is pretty good: https://github.com/JulianBirch/cljs-ajax
When I compile the file in the advanced mode (ns worker.core (:require [cljs.js])) (cljs.js/compile-str (cljs.js/empty-state) "(println \"test\")" #(:value %)) I have an error: Uncaught Error: No method in multimethod 'cljs.compiler/emit*' for dispatch value:
Does the compile-str work for advanced compilation?
Did I mis some configuration params?
Are people who use ClojureScript for Node.js just using JS servers like express, or is there a highly-regarded ClojureScript-specific project like Clojure's Ring?
@jouerose: I found goog.net.XhrIo pleasant and powerful: https://developers.google.com/closure/library/docs/xhrio
@fasiha: thanks. @micha made some interesting comments about the google closure library in the #C08BDAPRA
Why would (aset js/window ...) cause the globally defined Js var to not be recognized in non optimized compile, but fine in advanced compile?
@hellofunk: doesn’t sound very likely
Hi All, I’m working on a Reagent project and would like to fill a span with an ASCII code. The Ascii code, however, is being interpreted as a string and printed as-is to the page. Does anyone know how I would get the asccii code to be interpreted?
Here’s a code snippet:
[:span {:class "emailIsConfirmed no"}
[:span {:class "check"} ✔]
[:span {:class "x-mark"} "✘"]]
Maybe just use the unicode instead? “\u2714"