This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@jonas, this project wraps Material UI components to be used with reagent. https://github.com/tuhlmann/reagent-material
do you see an error in the destructuring bing of this function ? (defn handle-opinion [app-state [:log-opinion {:type "opinion" :name name :parent parent :opinion op} :as opinion]] (update-in [:log] conj opinion))
do you see an error in the destructuring bing of this function ?
`
(defn handle-opinion
[app-state [:log-opinion {:type "opinion" :name name :parent parent :opinion op} :as opinion]]
(update-in [:log] conj opinion))
`i assume I'm missing using destructuring binding, but i don't know what must be changed
@benzap: the :as opinion
should be inside the map destructuring form and vars to be bound come before keys, {type :type name :name parent :parent op :opinion :as opinion}
is what you want
note that binding type
shadows the core type
function but is not problematic in this example
not with destructuring AFAIK, you should check it before passing in to handle-opinion
or in its body
why can't i use this [app-state [:update-login {login-value login-key}]]
in a destrcuturating bing?
not quite sure to get what you say. what i want to pass as aregument to this func is something linke this
`
(my-func [:update-login {:username username}])
`
or
(my-func [:update-login {:password password}])
with (defn my-func [[_ {password :password}]] ...)
you could extract the password value
i recommend reading more about destructuring http://funcool.github.io/clojurescript-unraveled/#destructuring-section
ok, so, destructuring has use fixed keys. Because if i where to pass a map with two key-value then there is no way to find what is expected the be binded
Has anyone tried out @bhauman 's Devcards? It's got a lot going for it. I am really impressed.
I am starting with reagent / re-frame - I assume s3 is the place to deploy - any workflow suggestions?
I was putting the completed artifacts using s3cmd sync
, and now I use rsync
to put it on a server. I'll post the script:
#! bin/bash
cd ~/path/to/project
lein clean &&
lein minify-assets &&
lein with-profile prod cljsbuild once &&
rsync -avz -e "ssh" --progress ./resources/public/* me@my_server:/path/on/server
@bhauman: I do think it would be a good idea to add "A knob to reset the state, a knob to turn on history, a knob to display the data in the atom."
I usually just mount whatever component I'm interested in checking out, and use figwheel for any experimentation
@escherize: the new devcards is way different than the old one. Setup is especially easy.
@escherize: testing is integrated into cljs.test
@bhauman: yeah, you ask about it on this page: http://rigsomelight.com/devcards/#!/devdemos.defcard_api
@escherize: I've only been using them recently but I'm really sold. I see so much potential for these things. Bruce has really created a solid platform.
@bhauman: Not to lay it on too thick, but you really have created something quite terrific with Devcards. I can see so much thought that has been put into it. You've really captured the essence of what this kind of tool needs to be, imo.
I know this might not be a typical use-case, but canvas/webgl support would open up some really interesting possibilities.
@meow: I really here you here. The dom-node
is the base for things like that. At minimul you crate a function that invokes dom-node
The more I work with the api the more I find myself thinking "Yes!" that's how that choice should have been made.
You're welcome. It really deserves to be praised. I mean, heck. You've got support for simple or complex cards, markdown, react, om, reagent, regular dom nodes. It looks great out of the box. The live reloading is snappy. It is so easy to have a directory of cards and an index of all the cards.
The card api is simple, but supports all kinds of use-cases. The api itself almost gently teaches proper functional setup for working with stateful objects.
I need to head out for a bit but would love to ask you about canvas support via dom-node
. When I tried it out it didn't really work for me but I was also trying to make it work with my own request-animation-frame looping so it wasn't really a good trial.
@escherize: thank s I'll give it a try
arg. I just started seeing this in CI: WARNING: It appears your project does not contain a ClojureScript dependency. One will be provided for you by lein-cljsbuild, but it is strongly recommended that you add your own.
@bhauman: ok, I have a very basic canvas example working inside a devcard, now I've got questions for you when you have a few minutes.
first question is more an organization one - I assume I need to create an index file like I have done here: https://github.com/decomplect/ive/blob/master/src/ive/index.cljs