Fork me on GitHub
#re-frame
<
2017-03-03
>
victorvoid16:03:45

Hi guys! How are you doing? What is the best way to create a submit ? because it's don't working , how to implementation: "go a router with query params!" in secretary ? 😞 If I use .preventDefault also don't working (to go to router) if I use dispatch!

victorvoid17:03:36

I tried it, but secretary don't getting router (404)

caryfitzhugh21:03:41

@victorvoid I have accountant working with secretary. I think secretary may need to hook into something else to work. In the secretary page, it shows connecting to the goog.History. That may be important (I didn't see that in your code)... hope you figure it out!

isak21:03:50

we use (.setToken ) on a goog.History, along with .preventDefault

josh.freckleton21:03:29

I have a debug setup upon init that logins a user into the server, and then does some intial setup by getting the dummy user's data. so my setup is:

(dispatch-sync <login>)
(dispatch-sync <get stuff>)
As you might guess, the first dispatch-sync succeeds when the internal http request is sent, and before a response is recieved. Therefore, the <get stuff> line doesn't have auth priveleges yet. How do I chain these two things intelligently, without say injecting debug code into <login> or <get stuff>?

alanspringfield23:03:29

@josh.freckleton you could try setting #(dispatch-sync <get-stuff>) as the callback function for the login request

josh.freckleton23:03:59

@alanspringfield is there a way of setting that callback without needing to stick it into my login implementation? i'd considered making a subscription that triggers <get-stuff>, but, seems a bit wrong