Fork me on GitHub
#re-frame
<
2017-05-27
>
lumpy13:05:43

is there a builtin effect for changing the current panel? I want to return something like {:db db :route "/home"} as my effect map and have it update my active panel in the db but also set the location in the address bar of the browser.

akiroz14:05:19

You'll have to implement that yourself since routing is not handled by re-frame

akiroz14:05:30

in my last re-frame app, I have an effect that does history.pushState and a event handler for url changes that updates the app-db

lumpy14:05:02

this is what I came up with

lumpy14:05:06

I’m using secretary for routing, I was surprised that sec/dispatch! doesn’t update the address bar

lumpy15:05:35

Is there a better place for builtin effect docs than https://github.com/Day8/re-frame/blob/develop/docs/Effects.md

curlyfry15:05:58

lumpy: Don't think so, what's wrong with those?

lumpy15:05:12

just seemed incomplete, the http example was a little misleading, I thought it was a builtin effect

curlyfry15:05:40

lumpy: I think it's pretty complete. Hmm, I can't seem to find an example with http on that page?

lumpy16:05:09

just a little confusing to show a builtin handler that exists(dispatch), in the same example with one that doesn’t

lumpy16:05:16

It’s my understanding that only :http-xhrio exists, no :http

souenzzo16:05:52

You can use goog.HTML5History if you want to improve

souenzzo16:05:01

I will blogpost about that in some days

Geoffrey Gaillard21:05:04

@U2J4FRT2T I'm interested, could you share the link around here when the blogpost is ready ? 🙂

samueldev20:05:52

I don't know if any of you have been following the discussions / clojure subreddit lately, but it's become apparent that lowering the barrier to entry to clj(s) is something that is still being asked for. A blog post that is gaining traction from a beginner yesterday touted that CLJS could use something as easy as a create-react-app. I'm going to start on a create-reframe-app and am wondering if anyone is interested in helping / has any thoughts on the matter

samueldev20:05:20

(The idea being that getting set up with the JDK, then subsequently leiningen, then subsequently [library/framework of choice] (in our case; lein new re-frame ....) is enough hoops that it deters people - compared to a simple CLI tool being the only thing people need to install in the case of a one-off like create-reframe-app)