DEV Community

ray_v101
ray_v101

Posted on

Updating a React component based on Variable value changes in <script> tag?

I am appending my javascript code which contains some variables inside the <script> tag in <head> and my goal is to read the variable value and update the counter in a "Variable" React functional component. I tried to implement something but it didn't work out well. Any help will…

Top comments (0)