It does not reflect new data from server

PLEASE help us help you by writing a good post!

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
  • DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
  • Build problems? Link or paste the FULL build log & build settings screenshot

The better the post - the faster the answer.

My site name: https://smart-betting.netlify.app/
It made with React, Next.js. please visit by Chrome.

At my website, click ‘Open Bettings’ button located in top menu, it redirects to ‘https://smart-betting.netlify.app/bettings/’. When you first visit at ‘Open Bettings’ page, all data show clearly. But when you reload the page, a last data(located on top of datas) will be disappeared.

The problem is after deploy and I update data(from ethereum smart contract), the new data not reflected.
After updating data on ethereum side, redeploy site, the new data shows clearly.

How to reflect data in real-time?

Thanks.

Hey @SatoshiMom

I tested your site in Chrome, but it does not load. It pauses in the debugger with the following error:

Using Firefox I see a similar issue

I am unable to click “Open Bettings” in ether browser.

@coelmay
I have fixed that error, please test it again…

I tested in Firefox and Chrome again. Data shows. I refreshed page, and after a short delay, all data showed just the same.

If you want data to show in real-time you need to fetch the data on page load/re-load rather than hard-coding the data during build.

1 Like

@coelmay
This video is the problem new data(added after deploying) disappear.

Would you check it?
Everything works fine locally.

When you say this, are you running npm run start (or yarn start)? Have you run npm run build (or yarn build) and tested the production code? There are often differences in the how the two work and while everything works with the former, that is not always the case with the latter.

The fact the This Item will be disappear when reloaded placeholder remains suggests there is something with your code that isn’t right. I don’t know where you are reading data from nor why data isn’t showing. Without this information, I (and others) could only make guesses as to what is (or isn’t) happening.