SPFx web part keeps showing old employee information

Zastawny Minnix 20 Reputation points
2026-11-19T09:27:23.7466667+00:00

I've noticed another issue while using the web part. When someone updates an employee's information in the SharePoint list, the web part still shows the old details. The changes only appear after I manually refresh the page.

Is there a way to make the web part retrieve the latest information automatically without requiring users to refresh the page each time? I'd like to keep the displayed information up to date, especially since multiple people may be making changes to the list

Microsoft 365 and Office | SharePoint | Development
0 comments No comments

Answer accepted by question author
Michelle Nguyen 3,045 Reputation points Independent Advisor
2026-11-19T10:51:11.1866667+00:00

Hi @Zastawny Minnix

I'm just a fellow community user, so please treat this as general guidance. I haven't tested it with your web part.

What you're seeing is expected behavior: an SPFx web part usually loads the list data once, when the page loads, so it isn't aware of later changes to the list. To keep the data up to date without a page refresh, the web part needs to reload the data itself. Here are some options:

  1. Polling: reload the list data on a timer, for example every 30–60 seconds, using setInterval in your web part or React component. Clear the timer when the component is disposed, and keep the interval reasonable to avoid unnecessary requests and throttling. You can also reload the data when the browser tab becomes active again (the visibilitychange event), so users see fresh data when they come back to the page.
  2. List subscription: SPFx has a List subscription capability. To subscribe to changes, you create an instance of the ListSubscriptionFactory class and call the createSubscription() method with the ID of the list. Your web part can then reload its data only when a change notification arrives. Note that the official article describes this for document libraries. There is a PnP community sample that, according to its description, uses the List subscription capability to get notified of changes to a custom list and refresh the displayed data, so it may also work for your list, but please test it in your environment.
  3. Check caching: if you use PnPjs caching, or store data in localStorage or sessionStorage, make sure the cached data expires or is skipped when you reload, otherwise the web part may keep showing old values.

To help others give more specific advice, could you share:

  • Which SPFx version you're using?
  • How the web part gets the data (PnPjs, SPHttpClient or Microsoft Graph)?
  • Whether you use any caching?
  • Whether the data comes from a regular list or a document library?

Please let me know more details

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Zastawny Minnix 20 Reputation points
    2026-11-19T09:30:55.8566667+00:00

    AI doesn't seem to be able to generate an answer this time. Could someone please share some suggestions?

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.