# Notes are not shown after refreshing the website

**URL:** <https://discourse.sst.dev/t/notes-are-not-shown-after-refreshing-the-website/398>\
**Category:** General\
**Created:** [August 14, 2018, 8:54am UTC](https://discourse.sst.dev/t/notes-are-not-shown-after-refreshing-the-website/398 "2018-08-14T08:54:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartpl](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bartpl](https://discourse.sst.dev/u/bartpl)\
**Post date:** [August 14, 2018, 8:54am UTC](https://discourse.sst.dev/t/notes-are-not-shown-after-refreshing-the-website/398/1 "2018-08-14T08:54:20Z")

</div>

Hello Guys,  
I am observing a weird issue - Let’s say I have the app with DNS name [myapp.com](http://myapp.com).

All notes which belong to the specific users are shown on the main page if the users is logged in. The issue occurs when I refresh the webpage - the list of notes is empty.

I performed some troubleshooting and it looks like it is caused by componentDidMount() component which sets the state. It is processed just one time during first loading of the webpage. When I reload the webpage it is not processed again so the list of notes is empty.

First question - is it only me who has that kind of issue?  
I tested the same code but on some subpage, like [myapp.com/mynotes](http://myapp.com/mynotes) and in this case everything works fine, even when I’m refreshing the page the notes are listed.

Any idea how to approach it? I’m stuck ☹

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [August 15, 2018, 3:35pm UTC](https://discourse.sst.dev/t/notes-are-not-shown-after-refreshing-the-website/398/2 "2018-08-15T15:35:04Z")

</div>

Whoa that is really weird. So it works of a sub path but not on the root? And the request to the API is not made when you refresh the page?

Are you on Chrome? This sounds like an issue that might happen with progressive web apps (PWA).

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [August 15, 2018, 3:37pm UTC](https://discourse.sst.dev/t/notes-are-not-shown-after-refreshing-the-website/398/3 "2018-08-15T15:37:36Z")

</div>

You can try out the hints here to see if they fix it for you.

[https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#opting-out-of-caching](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#opting-out-of-caching).

---

<div class="post-metadata">

**Author:** ![bartpl](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bartpl](https://discourse.sst.dev/u/bartpl)\
**Post date:** [August 16, 2018, 12:03pm UTC](https://discourse.sst.dev/t/notes-are-not-shown-after-refreshing-the-website/398/4 "2018-08-16T12:03:16Z")

</div>

Hey jayair,  
I spent hours on analyzing the code as I saw that [demo.serverless-stack.com](http://demo.serverless-stack.com) has not that issue. I gave up, sorry. I’ve cloned the code, implemented my stuff again and it works fine… Shame but I don’t know why 🙂

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [August 31, 2018, 5:49pm UTC](https://discourse.sst.dev/t/notes-are-not-shown-after-refreshing-the-website/398/5 "2018-08-31T17:49:01Z")

</div>

Huh weird. Thanks for reporting back.
