When it comes to Canvas Dom operations in my NextJs file, I decided to include a Vanilla JS file using 'next/script'. The code for this is:
<Script id="canvasJS" src="/lib/canvas.js" ></Script>
. Everything seems to be working fine at the moment.
However, I now face the challenge of passing a variable (like an ID) from the NextJs file to the Vanilla File without any user interaction.
While I have managed to make it work with onClick using ()=>functionName(value)
, the process of passing a value without user interaction still puzzles me.
If anyone has some insight or advice on how to achieve this, I would greatly appreciate it.
Thank you in advance,
Frank