As I dive into learning ReactJS by creating a ReactJS version of my blog, I encountered an interesting issue while testing Google Page Speed. The recommendation to "prioritize visible content" led me to add a placeholder article with a loading message, lorem ipsum description, and a default header image. However, when retesting the page speed, I found that the title, image, and description of the placeholder article were not being rendered. It's puzzling to me why this static text isn't showing up, even after simulating a slow internet connection.
If you want to take a look at the code, it's available on GitHub: https://github.com/erikkubica/reactjs-simple-blog-test. Check out the src/modules/article/ArticleListItemPlaceholder.js and ArticleList.js files for more details.
In addition to the rendering issue with the placeholder article, I also noticed that the logo was missing. This discrepancy between my ReactJS site and a non-React website is confusing, especially since the styles and navigation component are loading correctly.
If you'd like to see the problem in action, visit:
Here's a screenshot of the problem for reference: https://i.sstatic.net/rwqiG.png
I appreciate any explanations, good practices, or tips you may have to offer for further learning.
UPDATE: I was able to resolve the problem.
The issue stemmed from the fact that custom fonts were not loading, causing the text to become invisible. Adding fontFamily: "Arial" to the inline styles of the elements fixed the problem. Special thanks to Mr. Lister for the assistance.
And a big shoutout to John Ruddell for sharing some best practices.