Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Adding Scripts to head with nextjs

I would like to implement a script within my next.js app I'm currently using

import Script from "next/script";

and then within my

return (
<div>
<Script>const tooltips= {color: true, icon: true, size: true}</Script>
<Script src="url to script"></Script>
<main>
</main>
</div>
)

the script loads, but how can i set the tooltips const in nextjs? using

const something = ""

doesn't work. I tried using the script within a normal html file and it works. How would i implement this in nextjs? I'm probably already implementing it wrong because i cant use const after my return? What would be the right way to set these values?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!