Fork me on GitHub
#reagent
<
2017-08-03
>
juhoteperi07:08:56

I started a Cljsjs wiki page to document which packages work with Closure module processing: https://github.com/cljsjs/packages/wiki/Closure-npm-Module-processing-status

mkvlr08:08:09

hey đź‘‹ is anybody here using reagent with react 16 beta yet?

pesterhazy08:08:08

I think so yes (alpha 16), no issues so far

pesterhazy08:08:30

hi martin btw 🙂

deg11:08:03

@gadfly361 - Another soda-ash question... What is the difference between, e.g. Button and FormButton? (When I use it inside a Form, I see that the layout is slightly different, but I can't quite figure what and why it is doing).

gadfly36112:08:10

@deg FormButton is some sugar to use the button as a control to a FormField. My guess is semantic does some styling changes when a button is used as a control.

gadfly36112:08:39

(Personally dont use semantic's forms tho)

juhoteperi12:08:14

@mkvlr @pesterhazy React 16 beta 2 is now available at Cljsjs. When testing with Reagent there were some test failures.

deg12:08:50

@gadfly361 - ok, thanks. Guess I'll have to poke deeper into semantic-ui. (Reason I'm asking is that I've now finished porting one app from re-com to soda-ash. I'm trying to generalize what I did and create a library wrapped around soda-ash that offers something closer to re-com's level of re-frame frienndliness. -- I like re-com's approach; I'm only moving away because they don't play well with touch screens or mobile devices).

gadfly36112:08:17

Oh that sounds awesome :)

mkvlr12:08:54

@pesterhazy @juhoteperi thanks, will give it a try then!

dimovich19:08:53

how can I write this in reagent?

dimovich19:08:56

<input class="jscolor {onFineChange:'update(this)'}" value="cc66ff">

dimovich19:08:16

does anyone have experience with colorpickers, maybe you can recommend some lib?

pesterhazy19:08:53

@dimovich that lacks context

fabrao20:08:19

Hello all, how the way to generate this [:ul {?}] -> <ul uk-accordion></ul> ?

fabrao20:08:00

I tried using http://html2hiccup.buttercloud.com/ but the result is [:ul {:uk-accordion }] that the compiler gets Map literal must contain an even number of forms

rgdelato20:08:01

have you tried using {:uk-accordion true}? (I don't know if it'll work, but other attributes like checked work this way)

fabrao20:08:48

@rgdelato It doesn´t work, and it get worst trying this <ul uk-accordion="collapsible: false">...</ul>

fabrao20:08:20

I saw this >Ŝablono only supports tags and attributes that can be handled by React. This means you can’t have your own custom tags and attributes at the moment. For more details take a look at the Tags and Attributes section in the React documentation.

fabrao20:08:54

so, I think I can´t use custom attributes in Reagent

noisesmith20:08:17

why would reagent use soblano?

juhoteperi20:08:03

It doesn't, but the limitation is from React, not sablono

juhoteperi20:08:17

That attrbute looks like you are trying to use some UIKit jquery plugin? That's probably not going to work anyway

juhoteperi20:08:47

Or does UIKit css also depend on those attributes?

juhoteperi20:08:30

But if this works like bootstrap and others, attributes are used to automatically initialize jquery plugins, but this doesn't work with React

juhoteperi20:08:54

If you need to use jquery plugins, you need to initialize them yourself from React lifecycle methods or something

juhoteperi20:08:06

(r/create-class
   {:did-mount (fn [this] (js/UIkit.accordion (r/dom-node this) #js {:opts "foo"})))
    :reagent-render (fn [] [:ul [:li "foo"]])})
Something like this maybe, ^ @fabrao

juhoteperi20:08:39

Hmm, UIKit mentions it should work with React > UIkit is listening for DOM manipulations and will automatically initialize, connect and disconnect components as they are inserted or removed from the DOM. That way it can easily be used with JavaScript frameworks like Vue.js and React.

juhoteperi20:08:55

Docs also say you can either use uk- or data-uk- attributes

juhoteperi20:08:58

> You can use UIkit components by adding uk- or data-uk-

juhoteperi20:08:15

So this would work with Reagent: [:ul {:data-uk-accordion true} ...]

juhoteperi20:08:41

> NOTE React will work with data-uk-* prefixes only.

jfntn22:08:40

If I have a non-reactive atom, can I use its watch function to update some sort of reactive proxy?