LWC · Apex
Research draft · Response not yet published
Why does refreshApex not update my LWC?
An LWC displays Apex data but its refresh does not behave as expected. The source example combines refresh logic with platform events; begin with a manual refresh button instead.
This page is a starting point for my own investigation. It does not yet provide a tested solution.
Read the original community question ↗Already answered; the author confirmed the fix. Your exercise should isolate the wire-refresh contract and add your own tested explanation.
What I’ll investigate
- Display a short list from a read-only wired Apex method and add a manual Refresh button.
- Compare retaining the full provisioned wire value with retaining only its data; leave platform events out of the first reproduction.
Research notes
Reading notes checked on 5 December 2026. Org testing is still pending.
Reading note: Salesforce requires refreshApex to receive a value previously emitted by an Apex wire. The documentation also explains its Promise and cache behavior. Compare that contract with the value saved by the source component. Not yet tested in an org.
My response
I haven’t written my response yet. After testing, I’ll explain the cause, the smallest fix, and how I verified it, then credit the original question and any answers I build on.
Solution or simplified workaround
Pending validation. I’ll explain when to use it, the smallest steps, the expected result, limitations, and how to undo it.
Validation
Not yet tested. I’ll record the actual results after reproducing the issue.
- Refresh shows a known record change.
- Loading feedback ends on success and on error.
- An error is displayed without hiding the last useful data unnecessarily.
Possible next step
A minimal refresh recipe first; add platform events only as a separate exercise.