Fork me on GitHub
#re-frame
<
2017-09-27
>
mikethompson00:09:13

@johnnyillinois note: any update to js/window.location.href` would be a mutation, so it should be done in an effect handler

johnnyillinois00:09:32

@mikethompson Do you know the API for this effect because my understanding is that reg-event-db should only affect the db?

johnnyillinois00:09:58

I know there is the reg-event-fx but I don't know the key for window.location.href effects

mikethompson00:09:51

You need to read up on and understand event handlers of the -fx variety, which return effects

mikethompson00:09:02

Returning a new db is just one kind of effect

mikethompson00:09:37

Then maybe use a library of effects like: https://github.com/SMX-LTD/re-frame-document-fx I've not tried it. But it probably shows the way

mikethompson00:09:52

The docs are currently in a bit of flux as we try to use gitbook ... but you should be looking at ... https://github.com/Day8/re-frame/blob/master/docs/SUMMARY.md Look at the material under the heading "Dominoes 2 & 3"

mikethompson00:09:09

Effectful Handlers etc

dfcarpenter18:09:26

Can anyone point to some examples or resources of client side authorization/protected routes?

bouchardsyl18:09:48

@danielcompton (or anyone else in the know), if I may, https://github.com/Day8/re-frame-trace Usage "Once [your application] is loaded, focus the document window and press ctrl-h to slide open the trace panel and enable tracing."" In my Chrome browser Ctrl-H opens history. Does "document window" mean something else? (pretty new to reframe overall)

danielcompton19:09:17

hmm, what platform are you on @lessylvains? we might need to make it adjustable or pick something that doesn't collide

bouchardsyl20:09:04

@danielcompton thank you for your reply. I found a clever way to solve this. It was a RTFM issue...

bouchardsyl20:09:15

I'm mindblown actually, re-frame-trace is oh-so-very useful. Took me an hour to figure out how to install it, then like 5 seconds to pintpoint the slow sub 🙂

danielcompton20:09:52

@lessylvains what could we do to make it easier to install? Or document it?

bouchardsyl20:09:59

@danielcompton I can't think of much to say, it was really me who skipped some of the "Installation" instructions and did trial and error instead. An ADD thing. Maybe add an idiot-proof statement as first bullet of the "Usage": make sure you DID follow the THREE (3) installation steps.

jhund20:09:32

@danielcompton to chime in on re-frame-trace: An incredible tool. I had trouble getting started, too. Did everything the instructions said. No traces would show up. In the end it was a lein clean that made it work. Maybe worthwhile to add to the documentation.

danielcompton22:09:46

cool, just added that, thanks