Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement - SSR Hydration Error #247

Open
hiwenny opened this issue Aug 19, 2022 · 0 comments
Open

Improvement - SSR Hydration Error #247

hiwenny opened this issue Aug 19, 2022 · 0 comments

Comments

@hiwenny
Copy link
Collaborator

hiwenny commented Aug 19, 2022

Screen Shot 2022-08-19 at 6 40 42 pm

Just leaving a note to what causes this error: mutation on client side, like this line in components/speakers/schedule.jsx:

new Date(timeSlot.startsAt).toLocaleTimeString()

This is because the local time at the server when SSR happens and your users' local times would be different.

With this error, your page will still render, but it's not as optimised as it could be.This render error causes the page to be processed (rendered) client-side so your users have to wait a fraction longer, instead of the pure server-rendered way. Functionally the end result is still a page that shows up, though.

Putting this down as Improvement to revisit at later stage. It requires some refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant