This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-10
Channels
- # aleph (2)
- # arachne (1)
- # beginners (5)
- # boot (33)
- # cider (12)
- # cljs-dev (6)
- # cljsrn (26)
- # clojure (33)
- # clojure-austin (7)
- # clojure-belgium (6)
- # clojure-chicago (1)
- # clojure-dusseldorf (1)
- # clojure-fr (1)
- # clojure-hamburg (1)
- # clojure-nl (11)
- # clojure-portugal (3)
- # clojure-russia (14)
- # clojure-spec (35)
- # clojure-uk (28)
- # clojurescript (49)
- # component (7)
- # core-async (75)
- # cursive (13)
- # datomic (15)
- # dirac (57)
- # emacs (5)
- # events (1)
- # hoplon (34)
- # jobs (2)
- # jobs-discuss (8)
- # lambdaisland (1)
- # lein-figwheel (7)
- # leiningen (3)
- # om (5)
- # onyx (8)
- # re-frame (56)
- # reagent (13)
- # testing (7)
- # untangled (30)
- # vim (51)
- # yada (17)
Some background: I have a hash-map datastructure of 15k static entries that I’d like to bundle with my app. Currently I store this in a JSON file that I require on app boot with 5mb large JSON file(js->clj (js/require “path-to.json”))
, which loads too slowly. My idea was to instead transform the JSON data to some reasonable datastructure that could be statically bundled and loaded on boot from AsyncStorage
, removing the parsing time from the
@looveh you need to write native module
@pesterhazy I also tried to use :value first but because of these problems we did the same as @misha there (using :default-value - which is actually not a proper model-view binding anymore...). fortunately we never had to change the value of an already rendered input field.
@knotschi, somebody should write a blog post about this
@pesterhazy can you describe an update already mounted component
use case in more details?
from my pov, component enclosing text-input either has local state, or accepts text-input value as an argument.
in both cases, if state gets changed - text-input gets updated.
yeah that's what I mean
and as long, as ui is responsive and does not stutter - I don't really care (and, honestly, don't really know ) if it is done by means of re-usint text-input, or creating new one on every key stroke.
I noticed weird artifact on some inputs: when you clear it up with backspace (or whatever key is on visual kb) - it often leaves letter g
or some other letter, as if it was a placeholder, but it is actually input text. and I can't delete it.
but I did not spend any time to debug this yet.
@misha what do you mean by "create new one on every stroke"?
rn might unmount current text-input with old value, and mount another text-input with a new value
they update existed
with default value thay not update anything
of course if you not update defaultValue
that's the thing: if you use default-value
instead of value
- input does not lag, when you type too fast
that's right, because things happened in native side and nothing going through bridge
exclude change event
there is not re-render