I want to run a script in react and need to include variables to the script. I use this script-reader: https://louisrli.github.io/blog/2020/06/04/react-dynamic-script-hook/#.YKvsrOtCRB0 . It works fine without variables but I don't know where I can include the variables properly. This is how it works with javascript:
<script>
var option = {
style: "something"
}
</script>
<script async src="sourcescript"></script>
Do you have an idea how I could include this option var?