Feature: Is it possible to create and merge a read-only React Component package?
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
## Problem
The current problem when displaying to the reader is the inability to satisfy both of the following at the same time:
1. hard to do SSR
2. Cannot write React-based logic for the reader
Editing and displaying articles are usually separate use cases and much requested
https://github.com/facebook/lexical/discussions/2880
https://github.com/facebook/lexical/issues/4960
## Solution
* Create a library of react components for serializeToHtml.
https://github.com/facebook/lexical/issues/2020#issuecomment-1129083803
* Arguments are assumed to be editorStateJson(Assuming json saved in DB), additional components, and styles.
* Add code to packages/lexical-react or create packages/lexical-react-viewer (temporary)
* tobe: Able to create in swift (IOS), kotlin (android), vue, etc.
Contributor guide
Research direction
Start by reading packages/lexical-react and the serializeToHtml implementation, then review discussions 2880 and issues 2020 and 4960 for the intended read-only rendering scope. Determine how editorStateJson, additional components, and styles would be handled, and whether a new lexical-react-viewer package is needed. Done means an agreed package design that supports SSR and React-based reader logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100