This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-12
Channels
- # admin-announcements (1)
- # arachne (3)
- # cider (11)
- # cljsrn (5)
- # clojure (26)
- # clojure-android (10)
- # clojure-greece (8)
- # clojure-russia (5)
- # clojure-spec (7)
- # clojure-uk (3)
- # clojurescript (16)
- # clojurex (38)
- # core-async (1)
- # css (3)
- # cursive (42)
- # dirac (2)
- # hoplon (28)
- # keechma (1)
- # lein-figwheel (2)
- # leiningen (1)
- # mount (3)
- # om (132)
- # onyx (46)
- # re-frame (53)
- # reagent (17)
- # spacemacs (7)
- # specter (50)
- # untangled (2)
- # yada (3)
@plexus: got it all hooked up, pulling data from the database and showing a nice highcharts chart. thanks so much for your help!
This method uses static routes and it's good enough for my purposes now, since the charts I'm defining will be pretty static. Now I'm curious how dynamic routes that would be used in a more complex REST setup (if I were actually serving clients, instead of myself, with potentially complex request paths) would be implemented
@joshjones: start here https://github.com/weavejester/compojure/wiki/Routes-In-Detail and here https://github.com/weavejester/compojure/wiki/Destructuring-Syntax
you would write routes that take parameters, either as GET url params, or in a POST, can be simple flat x-www-form-urlencoded, or rich JSON/Transit/EDN data that you're posting to the server, then it can generate data dynamically based on that
the only reference outside the code I find is here https://clojurians-log.clojureverse.org/reagent/2016-05-11.html
;; Don't rely on React for updating "controlled inputs", since it
;; doesn't play well with async rendering (misses keystrokes).
what I assume that means is that because Reagent batches render calls and flushes them in a requestAnimationFrame, this interferes with Reacts "controlled input", and so it re-implements its own version of controlled inputs. Is that correct?
;; For backward compatibility
(def as-component as-element)
(def render-component render)
(def render-component-to-string render-to-string)
Does this mean the function names on the left are deprecated in favor of those on the right? so render
preferred over render-component
?
that's how I'm reading that, but the docs at http://reagent-project.github.io/ use render-component
so not sure
@plexus that is correct, most of those renames are from v0.5.0, notes in the changelog
@gadfly361: do you know about ReagentInput (see my previous question)?
@plexus I don't know about it, but this PR comes to mind, possibly relevant: https://github.com/reagent-project/reagent/pull/126