Fork me on GitHub

Slow to run code once it’s up. Very slow


Hi! Which react wrapper can i use in 2020 for a React Native (Web) app. I love Reagent (with ReFrame) but is there modern and viable alternative (with recent React version) ?


first write your own wrapper and then based on your newly gained experience you will be fully qualified to pick one from existing libs 🙂

😁 4

@UHZPYLPU1 @U08E3BBST has recommended highly elsewhere, and I recently posted as my own “first write your own wrapper”. Hope this helps!


Wait, are we saying that Reagent is out of date?


I don’t think so. I think “modern” in this context suggests getting leverage from new features in React, whether that means new capabilities/better ergonomics or equivalent capabilities with a simpler library. I haven’t done enough work with react or reagent to know the tradeoffs over the lifetime of a big app, but I see the appeal given that hooks/suspense are powerful (relatively) new primitives from core react.


Hooks are about better ergonomics for per-component state. A lot of the React community has been moving away from the redux "state tree" approach and acting like "duh, it rarely makes sense." Kind of pisses me off actually because I don't understand why we reached peaked functional and are now moving backwards


Dan Abramov did pretty good job convincing me that hooks are the way to go here: it still does not prevent you from passing some state via props, or subscribing to global state via context but I’m a React noob


I'll watch it if only to understand what I see as madness coming straight from the top


Mm yeah, I can see that patterns like dealing with DOM input, etc are easier. Network calls still should happen centrally, imo


hello. I noticed that react seems to be OK with cljs lazy-seq returned by map (react is expecting a js array), ie this snippets works (`jsx` is just a macros that turns hiccup into react/createElement calls). Anybody would happen to know why it works ? I would have thought that react would complain upon receiving a lazy-seq instead of an array

        (fn [_ id]
          (jsx [:li {:key id} "hello"]))
        (repeat 3 {:identifier 'yolo :value "wesh"})


Ok it is because of (es6-iterable LazySeq) in src/main/cljs/cljs/core.cljs:3494 which adds the es 6 iteration protocol to the LazySeq type imo

☝️ 4
😲 4

pretty handy eh?


indeed, i did not know react supported es6 iterators


@adz5a you should avoid lazy seqs at all cost. they cause very weird behavior when using the "production" version of react. it only works fine in development.