Best approach to combine SttingToggle with ScriptTag in index.js?

2 0 1


I've read and trial-and-error'ed through many tutorials but I am pretty new to react, node and shopify and I did not get this combination to work.

I have a function that can set and unset a scripttag, the app has the corresponding rights, that works - but only if I call it from server.js

I can not call it from my SettingToggle in index.js, no matter what I try, I'm running into errors.

What do I need to do exactly to call functions from the admin interface page `index.js` ?


Thanks alot!

Replies 2 (2)
1 0 1

Same Problem, please help Shopify!

2 0 1


I really need to know how to call functions from buttons in index.js view.
I don't understand why a function can be called in server.js but it seems impossible to implement in index.js

All I want to achieve is to toggle a ScriptTag with a SettingToggle.
It sounds super basic but it's making my hair gray.

Help greatly appreciated!