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)
The main GitHub page of the project:
@r.hamers All updates to application state (what is in app-db) happen in event handlers.
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?
Do you have the piece of code that would be culprit?
Sure it's untouched
https://github.com/day8/re-frame/blob/master/examples/simple/src/simple/core.cljs
If I add my own :input {:on-blur etc ... } elsewhere in the view, it all works fine.
but line 71 - 73 in the original doesn't let me make changes
It's probably something stupid in JS that I'm not understanding (coming at this from Lisp)
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
Thanks Jan.
I do
That's my mistake
interestingly, there was :on-change handler until quite recent: https://github.com/day8/re-frame/commit/6471671b5c0e1e4a4b1c09edde449d22c3f9f801
Sorry, i editted that code recently
and didn't check it properly
That should be on-change
not on-blur
what was the race condition mentioned in that commit?
Ah OK cool. So the stuff https://day8.github.io/re-frame/dominoes-live/ with the :on-change emit
is the one to follow?
yes
Fab OK cheers
Sorry for the hassle
hey no worries. I find I learn more figuring stuff like this out
@jan.wnklr https://day8.github.io/re-frame/FAQs/laggy-input/
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
thanks for the fast feedback here š
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.
Yep, local state is the best way :)
not sure what all use cases might be but I would generally use default-value here tied to a reframe sub instead of value
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
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!