Fork me on GitHub
#cljsrn
<
2019-03-30
>
lepistane02:03:35

Oki guys an update from me. How to make sente + re-natal work? Just dont use csrf. send nil instead of token from client set csrf-token-fn to nil on backend and it will connect (with warning of course) and gg If you are using rest api - you should be fine. If not and you find a way to have it working with csrf - please contact me! Hopefully someone will find this useful in the future - i updated sente issue, reddit post

caleb.macdonaldblack08:03:17

Regarding the slow/laggy input text. How would you clear the field since you are only passing in a default value?

joshmiller18:03:17

If your :default-value is an atom, if you change the state of that atom, it’ll refresh the component. So you can set that to "" and it’ll clear the field.

caleb.macdonaldblack09:03:02

@haiyuan.vinurs Sorry Im trying to figure out how to update that field programatically after submitting (clearing it). Im thinking ill need to mess around with refs or something.

carocad09:03:15

Yeah you do, or at least I did 😅. I used a volatile to keep them reference to the input and rub methods on it based on external events

pez10:03:14

Need I bother with calling (rn/StyleSheet.create) on my styles map? It seems to work the same giving my components a cljs map for :style and I much rather keep my styles as cljs data than as js objects.

lilactown19:03:06

TL;DR there’s potentially a perf benefit but IME it doesn’t matter much

lilactown19:03:52

it doesn’t seem like the laggy text-input problem exists in vanilla React Native

lilactown19:03:04

I wonder if it’s an issue with reagent’s rendering

souenzzo09:04:32

It's not about reagent once I have this problem on fulcro Maybe is something with "lifecycle abstraction"

pez19:03:11

Apropos lag: I have a strange problem with my app on iPhone 6. Things run smoothly on other devices, but on iPhone 6 it is < 1fps. Not sure how to isolate the problem, but I think I will try to do just that.

jgood20:03:11

@thheller my nrepl seems to die with any error using expo + shadow-cljs I made a write up on zulip https://clojurians.zulipchat.com/#narrow/stream/193860-cljsrn/topic/shadow-cljs.20expo.20repl.20dies.20with.20compilation.20error Does this seem like something I'm doing wrong or is this a bug?

thheller20:03:14

@jgoodhcg please open a regular github issue. I'll take a look tomorrow

jgood20:03:03

Against which repo?

souenzzo09:04:32

It's not about reagent once I have this problem on fulcro Maybe is something with "lifecycle abstraction"