-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
useTitle broken in Next.js SSR (document is not defined) #749
Comments
Hm, due to now |
Ill fix it today |
Could be as simple as if (typeof document !== 'undefined && t.current !== title) {
document.title = t.current = title;
} |
@ecwyne i know, just dont have a time yet. In 3-4 hours i think ill push the fix. |
@ecwyne chek new version pls. |
@xobotyi still getting |
I think it needs to be |
That bad >_> okay, fix will be done in 10-15 minutes i suppose. |
@ecwyne and noooow =) it should be fine. |
What is the current behavior?
Throws error on server
ReferenceError: document is not defined
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than
react-use
. Paste the link to your JSFiddle or CodeSandbox example below:Use
useTitle
hook in Next.js projectWhat is the expected behavior?
Only sets title on client?
A little about versions:
macOS Catalina
Chrome 78.0.3904.70
16.11.0
react-use
:13.2.1
Yes
Apears to be a consequence of a133267
The text was updated successfully, but these errors were encountered: