Fork me on GitHub
#clojure-uk
<
2020-10-20
>
dharrigan06:10:16

Good Morning!

dominicm07:10:27

Morning 🌄

alexlynham09:10:49

oh wait i already morning'd

mccraigmccraig09:10:16

UTG protocol permits multiple mornings i think @alex.lynham

lsnape09:10:13

morning morning

thomas11:10:34

UTG is idempotent! the RFC says so! (I just decided)

Ben Hammond11:10:22

idempotent across what kind of timescales? I typically wish a good people a Good Morrow around 4 times a year; Does that mean I have achieved full coverage?

dominicm11:10:58

Is the second one ignored?

thomas11:10:06

you can call it as often as you want and it always has the same result.

dominicm11:10:46

That's not strictly true. Saying morning at 8:24am triggers different responses from saying it at 10:11am.

thomas12:10:00

Different response might still have the same result.

thomas12:10:16

(I'm just making this up as we go along)

Ben Hammond12:10:06

React question;

Ben Hammond12:10:02

I've got a table component that does an http fetch and then formats the results; I've just realised that I need to access these results from a new component on the same page

Ben Hammond12:10:27

should I fillet out the http/fetch into a third invisable component? I'm not sure how well that would work in React:

Ben Hammond12:10:33

React feels a bit more like WIN32 api, everything has to be a window

alexlynham12:10:49

i don't suppose you have redux or something available where there's a state atom?

👍 3
Ben Hammond12:10:22

no I don't. That would be the proper solution though, wouldn't it

Ben Hammond12:10:24

probably overkill at this point though; I might just bump the State Variable into the topmost view and hope for the best

Ben Hammond12:10:53

and ponder introducing redux in the medium term

alexlynham12:10:19

idk, i think react is fundamentally quite flawed WRT state mgmt and redux is a better model

alexlynham12:10:22

plus better devtools

danielneal20:10:54

you can put the state variable in the topmost view and pass it down using react context which avoids having to pass it through intermediate components

danielneal20:10:28

recoiljs is something modern react ish in this space that might be interesting to look at too if you're contemplating redux