re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
ruben.hamers 2020-06-26T03:58:10.047Z

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)

p-himik 2020-06-26T06:37:58.047100Z

The main GitHub page of the project:

2020-06-26T12:21:37.048100Z

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

Phil Hunt 2020-06-26T13:42:55.051100Z

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?

2020-06-26T13:54:47.052500Z

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

Phil Hunt 2020-06-26T13:54:59.052800Z

Sure it's untouched

Phil Hunt 2020-06-26T13:56:05.053900Z

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

Phil Hunt 2020-06-26T13:59:07.055700Z

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

Phil Hunt 2020-06-26T13:59:47.056300Z

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

Jan Winkler 2020-06-26T14:00:47.057100Z

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

Phil Hunt 2020-06-26T14:03:20.057300Z

Thanks Jan.

Phil Hunt 2020-06-26T14:03:51.057500Z

I do

2020-06-26T14:08:35.059400Z

That's my mistake

Jan Winkler 2020-06-26T14:08:41.059800Z

interestingly, there was :on-change handler until quite recent: https://github.com/day8/re-frame/commit/6471671b5c0e1e4a4b1c09edde449d22c3f9f801

2020-06-26T14:08:42.060Z

Sorry, i editted that code recently

2020-06-26T14:08:55.060600Z

and didn't check it properly

2020-06-26T14:09:08.061100Z

That should be on-change not on-blur

Jan Winkler 2020-06-26T14:10:10.062200Z

what was the race condition mentioned in that commit?

Phil Hunt 2020-06-26T14:10:11.062300Z

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

2020-06-26T14:10:27.062800Z

yes

Phil Hunt 2020-06-26T14:10:31.063Z

Fab OK cheers

2020-06-26T14:10:38.063200Z

Sorry for the hassle

Phil Hunt 2020-06-26T14:10:54.063600Z

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

Phil Hunt 2020-06-26T14:12:21.065500Z

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 Hunt 2020-06-26T14:13:10.065800Z

thanks for the fast feedback here šŸ™‚

Jan Winkler 2020-06-26T14:18:53.067800Z

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.

2020-06-26T14:34:43.068200Z

Yep, local state is the best way :)

naomarik 2020-06-26T16:53:39.071800Z

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

Jason 2020-06-26T20:32:41.081100Z

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

gekkostate 2020-06-26T22:11:28.086400Z

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!