0

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?

0

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.

| improve this answer | |
  • "Just use the method as a wire method, the system should take care of it for you" Well I think am doing that but after I came back to the page it shows old records. Could you give me some details about what do you exactly mean? I just have a wire method which is calling an apex and that's all – sebgy Aug 20 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.