This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-31
Channels
- # aleph (9)
- # bangalore-clj (1)
- # beginners (115)
- # cider (16)
- # clara (20)
- # cljs-dev (47)
- # cljsrn (50)
- # clojure (70)
- # clojure-dusseldorf (2)
- # clojure-italy (16)
- # clojure-sanfrancisco (1)
- # clojure-spec (9)
- # clojure-uk (37)
- # clojurescript (132)
- # cursive (21)
- # datomic (36)
- # dirac (53)
- # fulcro (34)
- # graphql (6)
- # hoplon (96)
- # jobs (2)
- # juxt (2)
- # keechma (2)
- # leiningen (5)
- # off-topic (3)
- # om (2)
- # om-next (3)
- # parinfer (3)
- # re-frame (17)
- # remote-jobs (1)
- # shadow-cljs (57)
- # specter (12)
- # sql (43)
- # unrepl (11)
- # yada (5)
@danielcompton thanks for the re-frame-trace release, it works now.
Hi, I'm using cljs-ajax in a re-frame project. When POSTing using ajax.core/ajax-request (via http-xhrio) the namespace is being stripped from qualified keywords when the JSON request is sent. When using ajax.core/POST the namespaces are left intact. So
:params {:test.user.model/email ""}
is being posted as JSON {"email:" ""}
. Is there a config option I'm missing?We use the other API in cljs-ajax
I think it’s ajax-request?
Hi! Me and my team released yesterday a tiny lib that has a functionality similar to js’s Promise.all()
feature. This is our first attempt to contribute to the community with code so any criticism and further guidance will be very much appreciated
https://github.com/magnetcoop/aramis
What are routing / history libraries that work well with re-frame?
I have been using accountant
to manage the browser history but I am having some trouble with scroll restoration. (It doesn't scroll to top when navigating to a new page and it doesn't properly restore the scroll position when pages have different heights.)
Are there examples that deal with this issue?
Ideally I would also like the location hash to act like in plain html (jump to anchor on page).
pushy does the url/html5history stuff, and you give it a callback to bidi which resolves the url and parameters, and then we push that into re-frame
@davidst I use bidi with accountant and I don't have those issues
it's a bit silly but let me describe one of the issues: if I scroll down and click on a link that is handled by accountant/pushy then the new page loads (as desired) but the scroll position is maintained (not desired; it should scroll to the top of the page)
Here is a document that describes those issues and possible solutions for react-router
https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/guides/scroll-restoration.md
I'd try:
- to force full re-rendering on route change (by assigning a key with gensym
to the root component). see if that fixes the issue, and if it does, find a better way
- to simply use the JS call for scrolling to the top, every time the route changes
Right now I make JS calls to scroll to the top when a new page loads. However it is not quite the right behavior. If the new page loads because of a popstate event (back button), the previous scroll position should be restored (at least that's the vanilla html behavior). I was hoping that there is a library that works with re-frame and more faithfully sticks to the navigation behavior for plain html
Had the same requirement and opted for @joelsanchez1st point but it still doesn’t solve the popstate issue
you could try to save the scroll position before a route change and then have a listener for popstate events, and apply that scroll position...or smth