Unfortunately, this hit counter has the same problem that our “Server Timestamp” has—it works fine in development, but gets frozen in time in production.
Your mission is to update the code so that it works in production.
No CodeSandbox link this time, sorry! You'll need to do this one locally, so that you can run a local build and serve in production.
Acceptance Criteria:
When running the production build (npm run build and then npm run start), the hit counter should continue to function correctly, increasing by 1 for every page visit.
Solution:
Note: We cover some new ground in this video, digging deeper into the .next directory and inspecting the build output. I suggest giving this one a watch even if you solved the exercise!