Fork me on GitHub
#reagent
<
2016-02-26
>
Tom H.00:02:54

I've used semantic ui's css in a couple of projects, it's really nice.

slotkenov07:02:13

Thanks all for the feedback. MDL seems too much of a burden then. I’m going to take a look at Semantic UI. I need a textfield with floating label though, lets see if semantic ui or bootstrap can offer that.

thomas11:02:32

hello folks...

thomas11:02:21

Quick question (hopefully). Is there a good way of combining Twitter’s bootstrap with reagent? Is there a place where I could see some examples?

thomas12:02:40

that looks pretty good as well

azzikid12:02:54

hey all, i am trying to use a react component (specifically react-dropzone: https://github.com/okonet/react-dropzone) but i’m getting an error: A valid ReactComponent must be returned. i’m using reagent/adapt-react-class to transform the react object into something i can use in reagent like this:

azzikid12:02:10

(def Dropzone (js/require "react-dropzone"))
(def dz (reagent/adapt-react-class Dropzone))

(defn build-dropzone []
   [dz {:onDrop #(.log js/console “dropped something")} "upload now”]

azzikid12:02:39

any ideas?

mull14:02:15

@azzikid: FWIW I used this component on a React project and regret it, react-dnd I think accomplishes the same thing albeit with more code and is much nicer. I also think there’s a reagent/ClojureScript alternative (I seem to remember seeing one.)

azzikid14:02:06

@mull what did you regret about it? the difficulty in getting it to work?

mull14:02:22

@azzikid: I wish I could remember specifics 😞 I picked it because it was easier to set up, but IIRC it got messy real fast with callbacks, rather than react-dnd that passes things down as props to your component

azzikid14:02:50

i’ll check it out!

azzikid14:02:00

i’m still curious about the error i’m getting with react-dropzone. i feel like i am missing a fundamental concept. or maybe i am doing it right but react-dropzone is not fit for reagent/adapt-react-class

mull14:02:03

Sorry, wish I could help more. Just wanted to drop in my two cents about the component. Still, since you’re using reagent why not go for a “native” alternative?

azzikid14:02:43

i couldn’t find a native reagent dropzone.

mull14:02:04

oh okay, my bad!

paulb17:02:05

[:ul
  (for [x (range 5)]
    [:li x]]
and
(into [:ul]
  (for [x (range 5)]
    [:li x]]
seem to render the same thing, when is it necessary to use into?

gadfly36117:02:01

In the first option, do you get key warnings? The second option, i believe will circumvent the need to add key metadata; however, it will also recreate the ul on every re-render. So i think the second option is easier and makes sense for small stuff, but anything bigger where rendering times come to relevance, the first option (with key metadata) is the way to go.

paulb17:02:04

that makes sense, thanks