Closed arunkumar413 closed 4 years ago
@arunkumar413 this issue must be posted at grapesjs-cli
Which of the following should be used to define components?
you must define your components at components.js
file. loadComponents
is the named import of that file.
after that you must define your blocks inside blocks.js
file in order to expose your defined components for usage.
cheers!
Could you please make a few codesandboxes to helps us better understand on how to use grapesjs with react, jsx, UI tool kits such as material-UI etc,.
https://github.com/artf/grapesjs/issues/2370#issuecomment-550515205
Hi Team,
I'm trying to use the grapes cli tool (https://github.com/artf/grapesjs-cli) to create a plugin to be used with a react project. The cli tool created blocks.js, components.js and an index.js files. The index.js file contains the below code:
Which of the following should be used to define components? Is the loadComponents used for loading the components defined in the components.js or adding the components?
1) loadComponents(editor, options) 2) editor.addComponents( ) 3) Or use the components.js file
Could you please make a few codesandboxes to helps us better understand on how to use grapesjs with react, jsx, UI tool kits such as material-UI etc,.
Thanks, Arun