Fork me on GitHub
#re-frame
<
2020-06-26
>
ruben.hamers03:06:10

Hey guys, what would be best practice to dissoc events from the db object? when & how to do it? (Whenever my event (http response json data) is consumed I would like to remove it from the db)

mikethompson12:06:37

@r.hamers All updates to application state (what is in app-db) happen in event handlers.

Phil Hunt13:06:55

So I've just followed the instructions for the 'simple' example in the re-frame git repo, and I've got the clock on my screen, but the on-blur field isn't interactable. Is there some obvious gotcha?

David Pham13:06:47

Do you have the piece of code that would be culprit?

Phil Hunt13:06:59

Sure it's untouched

Phil Hunt13:06:05

If I add my own :input {:on-blur etc ... } elsewhere in the view, it all works fine.

Phil Hunt13:06:07

but line 71 - 73 in the original doesn't let me make changes

Phil Hunt13:06:47

It's probably something stupid in JS that I'm not understanding (coming at this from Lisp)

Jan Winkler14:06:47

that input field in color-input component does not have an on-change handler. you should even see an error/warning about that in console

mikethompson14:06:35

That's my mistake

mikethompson14:06:42

Sorry, i editted that code recently

mikethompson14:06:55

and didn't check it properly

mikethompson14:06:08

That should be on-change not on-blur

Jan Winkler14:06:10

what was the race condition mentioned in that commit?

Phil Hunt14:06:11

Ah OK cool. So the stuff https://day8.github.io/re-frame/dominoes-live/ with the :on-change emit is the one to follow?

Phil Hunt14:06:31

Fab OK cheers

mikethompson14:06:38

Sorry for the hassle

Phil Hunt14:06:54

hey no worries. I find I learn more figuring stuff like this out

naomarik16:06:39

not sure what all use cases might be but I would generally use default-value here tied to a reframe sub instead of value

Phil Hunt14:06:21

last one was render moving out to separate namespace. Took me ages to figure out the code I was looking at (not yours) was old, but I learned a fair bit debugging it

Phil Hunt14:06:10

thanks for the fast feedback here 🙂

Jan Winkler14:06:53

ah, the good old input eater problem... me and my pal have been exploring the local state technique recently. heading off to re-com to see how you've tackled it.

David Pham14:06:43

Yep, local state is the best way :)

Jason20:06:41

I'm using https://github.com/luciodale/fork to do my form processing over https://material-ui.com/ widgets. I'd like to do some structured input fields, i.e. a phone number and credit card number which navigate across subfields, inserting boundary characters like parentheses and hyphens as required. Has anyone done this? I think I'm looking for the place and method in a fork form to inject the extra characters into the values for display

gekkostate22:06:28

Hi all, I’m trying to setup upload with https://github.com/martinklepsch/s3-beam and re-frame. I have seen the https://gist.github.com/kennethkalmer/e74794f7b8f6e3a695a1ddabfc38f2e3 by KennethKalmer. In the s3 documentation, they mention the use of a channel on the frontend onto which we can upload a file (?) and from which we can retrieve the return values. So my question is: how can we make use of s3-beam channel on the frontend with re-frame? Related question: Is it necessary to use the channel at all? As it seems KennethKalmer has avoided this. Thanks for your time!