Hacker News new | ask | show | jobs
by endisneigh 1523 days ago
It's worth mentioning that it seems like you need to use react with this.
1 comments

You don't need React. Lexical has no dependencies, so you can build bindings for your framework/library of choice. There are folks working on a SolidJS implementation right now. You could also do it with VanillaJS if you wanted too.

The reason we have React bindings from the start, is because we needed these internally at Meta.

GP may be responding to the fact that the vanilla quick start page is empty while the react one is not

https://lexical.dev/docs/getting-started/quick-start

Yeah, we're still working on our docs. Watch this space! :)
It would seem the very first thing you would do is provide an example for vanilla JS so that everyone could get started. It is impossible to use this at all for the large proportion of the world that isn't using React as we can't even see a single example.

If it's so complicated to use that it takes more than a minute of vanilla JS coding to initialize it, then I don't think I'm interested, thanks all the same.

They use it internally, why would they rebuild it in vanilla before they released it? Sounds like they are working on it even though it's of no use to them.
yeah - I didn't see any examples on how to use this without react.
Any particular reason Meta decided to implement it's own editor library instead of building on top of ProseMirror?
ProseMirror wasn't a good fit for us because it's integration (especially with React 18+) isn't quite there. Furthermore, we're also looking into building native ports of Lexical, and given's Lexical's API isn't DOM centric, it allows us to do that.

Lastly, we found ProseMirror was too heavy in terms of bytes for very minimal almost plain-text interfaces where we only wanted mentions + hashtags + custom emojis. Lexical comes in at around 22kb min+gzip, so it works really well for us.