Replies: 2 comments
-
I think that using React directly is also simple. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@hata6502 I agree, it is simple to use React, however, it is verbose. |
Beta Was this translation helpful? Give feedback.
0 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.
-
Describe a problem.
Editorjs custom blocks API is great for simple tools, however, when it comes to more complex tools, you have to deal with adding/removing/updating dom nodes, adding/removing event listeners manually, and so on.
Describe the solution you'd like. Mockups are welcome.
What if we could hand these tasks to a UI library like Reactjs that can manage the dom, with you worrying about attaching/detaching event listeners for example?
For that, I have created a POC for a babel plugin called babel-transform-editor-jsx-blocks
that will wrap Reactjs components with Editorjs's block class definition, mount and unmount the react component into the root of that block, and provide you with a way to get/set the block state.
for example:
The result after transpilation:
I would love to hear everybody's thoughts about this POC, so I do know if it is worth developing further or not.
Beta Was this translation helpful? Give feedback.
All reactions