This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-11
Channels
- # admin-announcements (8)
- # announcements (1)
- # boot (343)
- # braid-chat (23)
- # cider (20)
- # clara (5)
- # cljsrn (48)
- # clojars (5)
- # clojure (90)
- # clojure-canada (3)
- # clojure-czech (1)
- # clojure-russia (107)
- # clojure-sg (2)
- # clojurebridge (2)
- # clojured (10)
- # clojurescript (70)
- # community-development (73)
- # cursive (106)
- # datavis (40)
- # datomic (40)
- # docs (4)
- # editors (1)
- # emacs (1)
- # events (4)
- # funcool (2)
- # hoplon (46)
- # jobs (2)
- # ldnclj (11)
- # mount (8)
- # om (214)
- # onyx (12)
- # re-frame (35)
- # reagent (31)
- # spacemacs (12)
- # yada (18)
hey reagent guys! I am currently testing out reagent for a react native process but run into some problems...
For one particular case I need to pass a rendered component as a property to another component
I tried something like this:
(set! js/React (js/require "react-native/Libraries/react-native/react-native.js"))
(def view (r/adapt-react-class (.-View js/React)))
(…)
(assoc :rightCalloutView [view {:flex 1} [text {} "Hi"]])
but that is not renderedplus it is not getting rendered by reagent/render because it is not part of the normal component tree
So I'm trying to use semantic-ui components with reagent and documentation says I should do something like this - http://semantic-ui.com/introduction/integrations.html
I thought componentDidUpdate
would be called when reagent re-renders the component on some reactive change.
Or no, I thought I wasn't derefing the atom I wanted to be reactive on in render, but I do.
Is there anything similar to wrap
I could use in form-2? Like so:
(defn component [...]
(let [reactive (wrap-alternative #(on read) #(on reset))]
(fn []
...)))
and expect it to work similarly to ratom?You could take a look at re-frame; it's not exactly redux, but inspired by it. (EDIT: turns out I've mixed up flux with redux, my bad)
awesome. I'm trying to move over just because the full React ecosystem has become insane with what you need to bootstrap a project. Reagent (and Elm) both are super nice versus having to start layering Babel, Webpack, Browserify, etc. etc. etc. good luck, have fun.
Well, you can't run from some of those here either - if you need a JS library that has modules you have to compile them out with webpack or browserify though.
https://github.com/magomimmo/modern-cljs/tree/master/doc/second-edition has a nice introduction if you would be interested
yeah. I've been getting hung up on Clojure itself on the JVM, but ClojureScript is really nice and PureScript just isn't doing it for me.
The parts are a bit outdated (it uses jQuery-like domina
for example) but the general principle is the same.
Well, if you came here before boot it would probably not be as nice to do Clojurescript; lein cljsbuild setups tended to be fiddly.
I think it's mostly my lack of understanding about PureScript itself. I also just think front end packaging is in a dismal state, and everything's careening toward webpack, and I think PureScript is very webpack focused.
maybe I need to spend time with WebPack, but holy crap, you take a break for 8 months and it's all different.
Well yeah, that's webdevelopment for you. I have a feeling the most of web ecosystem likes to hipster it up quite a lot.
RE: my issue earlier I've created a reactive value with callbacks both for getting and setting the value - https://gist.github.com/jaen/c59a3e0abcf0c6f6ade2 - it seems to work for my use case but maybe there's something wrong about this approach?