Fork me on GitHub
#re-frame
<
2019-01-09
>
WhoNeedszZz01:01:30

If you're using any atoms make sure they are reagent/atom and not a regular Clojure atom.

victorb09:01:55

also, discovered the other day you can't subscribe inside for etc

mikerod15:01:49

That should just related to deref on a reaction in a lazy context.

mikerod15:01:42

I am fairly sure re-frame mentions this in docs somewhere. May be good to read/understand. Reagent should give you warnings typically if it detects you are doing that.

mikerod15:01:59

During dev/unoptimizable mode that is

victorb18:01:09

Yeah, Regeant/Re-frame gives a console warning with a link to docs on it when it detects it, but I was in a case where it didn't detect it, only state was never updated

mikerod18:01:38

Yeah, if the sequence is never realized, nothing will detect I believe is how tha goes

Whiskas15:01:58

would you guys refactor these events in the form of effects?

manutter5115:01:26

I would not, since it’s only updating a value in the app-db. I reserve effects for state that ends up being store or retrieved via an external (non-app-db) source.

Whiskas15:01:20

i was thinking like “hmm, i need to make events that represents the user intention” when i thought about refactoring it

Whiskas15:01:41

but we use events as request handlers too, so i think it’s fine so

Whiskas16:01:16

has someone here already used :http-xhrio-fx?

Whiskas16:01:00

i’m using it

Whiskas16:01:04

:thinking_face:

Whiskas16:01:15

it’s strange how :format is not setting the content-type

Whiskas16:01:25

i will see what is happening more carefully

Whiskas16:01:31

just got it, it was because i passed the :body keyword

Whiskas16:01:44

:body the exact data to send with in the request. If specified, both :params and :request-format are ignored. Note that you can submit js/FormData and other "raw" javascript types through this.

Whiskas17:01:08

:re-frame-http-fx is doing a OPTIONS request before every request

manutter5117:01:44

That’s probably coming from the underlying cljs-ajax package, or possibly from the browser.

manutter5117:01:53

The first thing I’d look into is whether it has something to do with CORS.

scknkkrer18:01:51

Guys, my company has a project with Angular 7, do you guys suggest me a Technology to manage the state like re-frame does. As functional…