blocksuite
blocksuite copied to clipboard
feat: react adapters
trafficstars
Add custom react wrapper, custom react renderer for lit and examples.
This PR migrated codes that are currently in AFFiNE codebase. We free like it is the time to move into blocksuite.
- react wrapper: add a custom
createReactComponentFromLitthat is similar tocreateComponentfrom@lit/react. This was added to mitigate issues that web components in blocksuite are often instantiated via creating web components & appending to dom directly in JS, described in https://github.com/lit/lit/issues/4435 - react-lit portal: that makes it easier to convert React element into Lit (TemplateResult). Original PR: https://github.com/toeverything/AFFiNE/pull/6124
- examples: like the react-basic example, but re-mastered with the React adapters fragments + demo for react-lit portal
https://github.com/toeverything/blocksuite/assets/584378/a927c640-4c92-40f3-88b1-4231171f47cf
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| blocksuite | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 21, 2024 6:07am |
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| blocksuite-docs | ⬜️ Ignored (Inspect) | Visit Preview | Mar 21, 2024 6:07am |
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @pengx17 and the rest of your teammates on
Graphite
Closing after discussion. A new react adapter will be introduced.