optimajet / formengine

Drag & Drop Form Builder Library for React.
https://formengine.io
28 stars 4 forks source link

imported lib not loaded #19

Open tulusibrahim opened 2 months ago

tulusibrahim commented 2 months ago

Hi, my goal is to use axios and some other lib. My step is:

but when i call axios in an onLoadData event, it say axios is not defined even tough the load axios is called image image

same thing also happened to other lib

here is the reproducible issue: https://stackblitz.com/edit/vitejs-vite-kwyju8?file=package.json,src%2FApp.jsx,src%2Fbuilder.jsx%3AL7,src%2Fviewer.jsx

go to /viewer to get the error

tulusibrahim commented 2 months ago

the error is gone when i add loadAxios before the loadData. but it seems inefficient because it will load the script everytime? image

optimajet commented 2 months ago

Hi @tulusibrahim, could you please describe why you need to load some external library in actions?

The actions are not explicitly linked to each other, moreover all actions are executed asynchronously.