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

Disable <title/> warning when React Helmet is used #7483

Merged
merged 1 commit into from Jun 4, 2019
Merged

Disable <title/> warning when React Helmet is used #7483

merged 1 commit into from Jun 4, 2019

Conversation

ku8ar
Copy link
Contributor

@ku8ar ku8ar commented Jun 1, 2019

Disabling this warning:
#4596

We use React Helmet in the project (according to examples/with-react-helmet).
Helmet <title /> is injected into _document using Helmet.renderStatic(). And then controlled by every page.
Everything is rendered correctly. And this warning is really annoying...

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2019

Stats from current PR

Click to expand stats
zeit/next.js canary ku8ar/next.js canary Change
Build Duration 15.2s 14.1s -1.1s
node_modules Size 40.9 MB 40.9 MB ⚠️ +198 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 69 kB 69 kB
Client _app Size 3.33 kB 3.33 kB
Client _app gzip Size 1.37 kB 1.37 kB
Client _error Size 8.25 kB 8.25 kB
Client _error gzip Size 3.13 kB 3.13 kB
Client pages/index Size 288 B 288 B
Client pages/index gzip Size 222 B 222 B
Client pages/link Size 4.19 kB 4.19 kB
Client pages/link gzip Size 1.85 kB 1.85 kB
Client pages/routerDirect Size 411 B 411 B
Client pages/routerDirect gzip Size 296 B 296 B
Client pages/withRouter Size 393 B 393 B
Client pages/withRouter gzip Size 280 B 280 B
Client main Size 22.8 kB 22.8 kB
Client main gzip Size 7.58 kB 7.58 kB
Client commons Size 184 kB 184 kB
Client commons gzip Size 59.8 kB 59.8 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 769 B 769 B
Base Rendered Size 1.34 kB 1.34 kB
Build Dir Size 817 kB 817 kB ⚠️ +109 B
Click to expand serverless stats
zeit/next.js canary ku8ar/next.js canary Change
Build Duration 16.2s 16.6s ⚠️ +461ms
node_modules Size 40.9 MB 40.9 MB ⚠️ +198 B
Total Bundle (main, webpack, commons) Size 210 kB 210 kB
Total Bundle (main, webpack, commons) gzip Size 69 kB 69 kB
Client _app Size 3.33 kB 3.33 kB
Client _app gzip Size 1.37 kB 1.37 kB
Client _error Size 8.25 kB 8.25 kB
Client _error gzip Size 3.13 kB 3.13 kB
Client pages/index Size 288 B 288 B
Client pages/index gzip Size 222 B 222 B
Client pages/link Size 4.19 kB 4.19 kB
Client pages/link gzip Size 1.85 kB 1.85 kB
Client pages/routerDirect Size 411 B 411 B
Client pages/routerDirect gzip Size 296 B 296 B
Client pages/withRouter Size 393 B 393 B
Client pages/withRouter gzip Size 280 B 280 B
Client main Size 22.8 kB 22.8 kB
Client main gzip Size 7.58 kB 7.58 kB
Client commons Size 184 kB 184 kB
Client commons gzip Size 59.8 kB 59.8 kB
Client webpack Size 1.49 kB 1.49 kB
Client webpack gzip Size 769 B 769 B
Serverless pages/link Size 342 kB 342 kB
Serverless pages/link gzip Size 87.7 kB 87.7 kB
Serverless pages/index Size 333 kB 333 kB
Serverless pages/index gzip Size 85.3 kB 85.3 kB -1 B
Serverless pages/_error Size 333 kB 333 kB
Serverless pages/_error gzip Size 85 kB 85 kB -1 B
Serverless pages/routerDirect Size 334 kB 334 kB
Serverless pages/routerDirect gzip Size 85.2 kB 85.2 kB -2 B
Serverless pages/withRouter Size 334 kB 334 kB
Serverless pages/withRouter gzip Size 85.2 kB 85.2 kB
Build Dir Size 2.39 MB 2.39 MB ⚠️ +109 B

@timneutkens timneutkens merged commit 02551d3 into vercel:canary Jun 4, 2019
@timneutkens
Copy link
Member

timneutkens commented Jun 4, 2019

Thanks! This is fine to opt out of the warning.

Just to be clear I wouldn't recommend using react-helmet for most cases in Next.js:

  • Bigger bundle size
  • More rendering overhead
  • Extra implementation overhead

In most cases you can/should use next/head.

@ku8ar
Copy link
Contributor Author

ku8ar commented Jun 5, 2019

Thanks for quick merge and info about bundle size.
We plan to use next/head in future version of app, but migration will take a long time. You know how it is...

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

Successfully merging this pull request may close these issues.

None yet

3 participants