This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-23
Channels
- # announcements (1)
- # babashka (29)
- # beginners (53)
- # berlin (1)
- # cider (14)
- # clj-kondo (18)
- # cljsrn (16)
- # clojure (141)
- # clojure-france (4)
- # clojure-italy (8)
- # clojure-norway (1)
- # clojure-uk (57)
- # core-async (7)
- # cursive (3)
- # data-science (2)
- # datomic (12)
- # duct (5)
- # fulcro (27)
- # hoplon (37)
- # immutant (1)
- # jobs (2)
- # jobs-discuss (7)
- # kaocha (2)
- # leiningen (3)
- # music (17)
- # nyc (1)
- # off-topic (22)
- # pathom (27)
- # re-frame (33)
- # reitit (23)
- # shadow-cljs (20)
- # tools-deps (15)
- # vim (29)
@vikeri this event runs only when component is mounted, in my case it's not going to work, I open new component after my component rendered, than I go back by "back button", so my component stays on stack and nah, does not even want to update 😕
My situation is next: I use ReactNavigationStack to navigate between views in my app. When I open first view, I fetch data from server, than with a button on the firrst view, I open second view, do my stuff and go back with back button in a header of the view, and I see first view again. Now I want to fetch data from server again to get updates
Probably better to observe the navigation state then, and depending on which route you’re on dispatch new http calls
Since the views are cached in React Navigation I think it’s the only way to do it reliably
Ok, I'll try, thanks. Btw do you know why reagent does not update rendered dynamic data sometimes? I have a view on which I display a list, this list is computed from subscribed data, and I change this data with response from server.
@titov In my experience reagent always updates the data. But then I also use re-frame 99% of the time. I can recommend re-frame if you haven’t looked at it
Ok, well then I’ve never had that issue. Are you sure you’re updating the data correctly?
@vikeri take a look at my code: https://codeshare.io/alg6vj