Clojurians
#reagent
<
2015-11-18
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mswift4215:11:48

Hi, I'm trying to use this colorpicker: http://mjolnic.com/bootstrap-colorpicker/. How can I listen to the change event called 'changeColor' from within a reagent component ?

dviramontes17:11:25

any ideas oh how to make secure front-end routes using secretary - and reagent-utils? something like https://github.com/gf3/secretary/issues/41 doesnt have to be a middle-ware; just having the user sign-in and protect other routes b4 they do so. (not strictly related to Reagent, i know but Im using Reagent for this project)

dviramontes17:11:01

Hi @mswift42 so i recently had to do something similar here: https://github.com/codefordenver/rmfu-feed/blob/master/src-cljs/rmfu_ui/profile.cljs#L12-L32 its not a 1:1 to what you may be trying to do but it might spark an idea on your end basically, I would define an r/atom at the component level an have the -colorpicker $('color-picker-selector') on-change handler mutate the atom