Do you have any idea if there is a way to call refreshApex after component was rendered? Let's say we will have a mobile page in the app and I want to have the newest data everytime I open the page on my phone.
How I can do that?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
You can't modify data in the renderedCallback, which is what you're basically asking, as this would create an infinite loop (and those are a Bad Idea). Just use the method as a wire method, the system should take care of it for you. If you're really having problems, you could add refreshApex to the connectedCallback, but this is rarely needed in practice.