split core plugin into `slate-react` and `slate-dom`
See original GitHub issueThis is more of an idea, and maybe a bit longer-term, since I think keeping focused on React-only for now is best. But just thinking about if Slate were to be architected in a way that makes it possible to have view layers for different libraries (React, Vue, etc.)… in light of #1106 where we introduce the slate-react
package.
Right now there’s lots of logic in the <Content>
component that controls things like the data
object that gets passed to handlers, and e.preventDefault()
to suppress browser behaviors. Lots of that stuff would want to be shared between different view libraries, since it’s all just browser-specific, not necessarily React-specific.
(This separation also applies if Slate were to support React Native I think, although I don’t have experience there.)
Instead, the logic inside slate-react
would probably be split into another package slate-dom
, which every view layer could then depend on instead of having to repeat lots of boilerplate browser-based code.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:23
- Comments:21 (5 by maintainers)
Top GitHub Comments
slate-vue is needed…
Agreed! This library has everything I want… except it is tied to React!