Fork me on GitHub

@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 😕


@titov Sorry meant :componentDidUpdate


@vikeri how can force this event to run?


It will run every time the component is updated


How do you mean force?


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


Nah I was afraid you will propose this 😄


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


I use re-frame 😞


Ok, well then I’ve never had that issue. Are you sure you’re updating the data correctly?


I hope so cause in other place almost same code does work.


I would place load-warehouse and load-item-names in a handler and get the :car-key from the db directly. Try to run everything via handlers and subscribers