Fork me on GitHub
#re-frame
<
2019-10-09
>
thelittlesipper02:10:28

Anyone know how I could go about aborting in-progress http requests - does re-frame have this feature implemented yet?

ingesol06:10:31

@sansaripour Check this out. Not done, but I don’t think previous version supports cancellations https://github.com/Day8/re-frame-http-fx-2

👍 4
jahson06:10:22

There was some work done on previous version, I once linked an issue here.

manutter5114:10:54

@lucio I figured it out finally. It was (predictably) a bug somewhere else--I messed up the structure of the component so that the subscriptions were only being deref’ed at component mount time. The actual render function was then using only those original values, so no apparent update would ever happen.

aw_yeah 4
shen14:10:59

form-1 v.s. form-2 problem?

manutter5114:10:49

Yeah, I managed to invent a form-1-and-three-quarters. :face_with_rolling_eyes:

dominicm14:10:46

I've seen this many times, don't worry about it :)

dominicm14:10:50

It would make a cool lint

Lu15:10:51

That's what I thought 🙂

sandbags15:10:36

I've seen a number of libraries that seem to be about making form-handling smoother in re-frame but they seem a little old and unmaintained. I'm wondering, since I am about to start doing some forms, is such a library still a necessity or has re-frame/re-com advanced to make forms easier? Or, if not, is there a recommended library that is maintained? Thanks.

Lu19:10:17

@sandbags I am currently maintaining a very thin library 📚 that uses plain reagent and reframe to organize a bit the form components..if you want to give it a shot I’m glad to help: https://github.com/luciodale/fork

sandbags10:10:46

Thanks @lu will give it a look

Lu17:10:41

No problem :)

andrea.crotti16:10:55

@sandbags You can use antizer if you like ant design

andrea.crotti16:10:31

Not really reframe specific but very well with reagent /reframe

sandbags16:10:07

@andrea.crotti thanks, i've not come across ant design, I'm not sure what "enterprise class design" is either if it comes to that 🙂

andrea.crotti16:10:34

Well I guess it depends what you are doing

andrea.crotti16:10:50

But it helps creating nice forms without much effort

royalaid16:10:06

@sandbags I have found that form handling is just difficult and bespoke for a bunch of different ui-toolkits. Some make it easier but because most target JS you have to wrap and integrate your way of doing things all the same

royalaid16:10:47

A thing that seems to work for me is to have an implicit context or given path inside the app-db that holds form state

royalaid16:10:26

then you can reference and check any part of the form from any other part of the form which is useful when you reach forms that do sophisticated autocomplete things and doesn't affect your code that much if you don't

royalaid16:10:05

also .checkValidity on the ref for your form is your friend IMO

andrea.crotti16:10:32

@sandbags here is an example using antizer https://github.com/AndreaCrotti/elo/blob/master/src/cljs/byf/league_detail/add_game.cljs#L34 it doesn't help with the state management as @royalaid mentioned, but I think that's quite easy to deal with using re-frame anyway

sandbags18:10:43

thanks guys.