This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-25
Channels
- # announcements (3)
- # beginners (64)
- # calva (1)
- # cider (78)
- # clj-kondo (4)
- # clojure-losangeles (1)
- # clojure-uk (5)
- # clojuredesign-podcast (1)
- # clojurescript (15)
- # cursive (2)
- # datomic (19)
- # docker (7)
- # fulcro (17)
- # graalvm (1)
- # hugsql (1)
- # instaparse (2)
- # jobs-discuss (25)
- # joker (2)
- # luminus (1)
- # off-topic (20)
- # pathom (1)
- # pedestal (2)
- # reagent (5)
- # shadow-cljs (83)
- # spacemacs (11)
- # vim (1)
- # vscode (13)
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 🙂
@UHZPYLPU1 @U08E3BBST has recommended https://github.com/roman01la/uix highly elsewhere, and I recently posted https://github.com/anrosent/rct as my own “first write your own wrapper”. Hope this helps!
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: https://www.youtube.com/watch?v=V-QO-KO90iQ 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
[:ul
(map
(fn [_ id]
(jsx [:li {:key id} "hello"]))
(repeat 3 {:identifier 'yolo :value "wesh"})
(range))]