Replies: 1 comment 3 replies
-
Can you please elaborate better your use case, what is the purpose of the async call inside the plugin? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm trying to build a component that connects to my CRM, and before building the component I need to make some api calls, I'm using ofetch for this.
The problem is, I need to use async and await, however if I put the export default which is inside index.js (in grapesjs-cli) it randomly gives the plugin loading error, that is, I update the page 5 times, 4 work and one of the component definition error: "Plugin cube-form not found {context: 'plugins', plugin: 'cubo-form', level: 'warning'}".
I realized that removing async from the default export solves the problem, but the question remains, where do I make the calls to the api? I even tried to do it outside the export default, but I need the opts that are inside the export default (to get the token that the user enters to make the api calls).
Beta Was this translation helpful? Give feedback.
All reactions