This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-26
Channels
- # aws (1)
- # beginners (15)
- # boot (30)
- # cider (13)
- # cljsrn (16)
- # clojure (458)
- # clojure-dev (15)
- # clojure-france (131)
- # clojure-greece (124)
- # clojure-korea (2)
- # clojure-spec (42)
- # clojure-uk (115)
- # clojure-ukraine (1)
- # clojurescript (103)
- # component (18)
- # cryogen (1)
- # datomic (4)
- # dirac (3)
- # figwheel (1)
- # funcool (13)
- # hoplon (60)
- # luminus (2)
- # off-topic (2)
- # om (28)
- # onyx (45)
- # parinfer (28)
- # pedestal (1)
- # proton (23)
- # re-frame (18)
- # reagent (36)
- # ring (1)
- # ring-swagger (5)
- # untangled (13)
- # vim (9)
Anyone else having laggy text-input data entry using reagent? I’m not even doing a roundtrip to re-frame and I’m getting errors like this:
YellowBox.js:67 Native TextInput(Asdfasdf) is 4 events ahead of JS - try to make your JS faster.
(defn simple-text-field []
(let [current-value (r/atom nil)]
(fn []
[text-input {:onChangeText #(reset! current-value %)
:value @current-value
Then again, maybe it’s just my iOS simulator? Everything seems to be running slowly.
I’m trying to install boot-react-native as per "http://presumably.de/boot-react-native.html”, but crashes on boot inst:
clojure.lang.ExceptionInfo: No such task (inst)
data: {:file
"/var/folders/_w/8wz2746x5_ddxg9y81v4lxv80000gn/T/boot.user8903925845791296877.clj",
:line 21}
java.lang.IllegalArgumentException: No such task (inst)
boot.core/construct-tasks core.clj: 905
...
clojure.core/apply core.clj: 630
boot.core/boot/fn core.clj: 949
clojure.core/binding-conveyor-fn/fn core.clj: 1916
…
@seantempesta: replace :value
with :defaultvalue
@misha I tried that, but then I couldn't update a field that was focused. I ended up doing it the react way and used their setState method using :value. Not sure why it's so janky with reagent.
@sineer @levitanong fwiw last night i did a PoC - i couldn't integrate compassus but i totally stole the idea and re-implemented routing with union queries (no add-root!
or set-query!
neeeded), it totally works, as a quirk you need to implement the NavigatorExperimental reducer yourself, and basically take care of keeping state/real navigation in sync yourself, but the advantage is massive (no need for nested navigation queries either)
@dzannotti nice! can you put up a repo so we can take a look and learn from you? 😄
@seantempesta if you wrap text-input in a component, and have a changing atom above that component - :defaultValue
works much faster.
(rum/defc input [v on-change]
(text-input {:defaultValue v :onTextChange on-change}))
(rum/defcs user-name > (rum/local "" ::txt) [state]
(let [txt (::txt state), on-change #(reset! txt %)]
(input @txt on-change))
@dzannotti I look forward to see what you have done 🙂 I read Compassus code last night and brainstormed how to integrate with @exponent/ex-navigator and I think I have a way to do it, I'll keep you posted on progress I make later this eve..
@sineer nothing special, it's a similiar approach to compassus pretty much (union queries with a fixed root component pretty much)
My latest approach is to build a "Compas" Om component init compassus in state and render the nav-provider and feed it a filtered compassus route->component map so that it (Compas) can route using compassus and in the mutation fn set call the nav-provider push/pop "under the hood"... This way I get to use ex-navigator drawer-items with multiple stack-nav and get compassus to drive them stack-nav(s).