marp-team/marp-react là một trong những repo tập trung giao diện mà TopGit theo dõi, hiện có 26 sao, viết chủ yếu bằng TypeScript. [INACTIVE] Marp renderer component for React
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This component is suited to create presentation tools integrated with Marp by React. Marp would create the static slide contents consist of plain HTML and CSS, so you have to notice that it's not suited to control the content of your slide via React.
React community has more appropriate and awesome tools for such that purpose. Typically these tools should help if you want to create a beautiful slide deck via React:
Spectacle can create and control your slide deck with React's some flexibilities.
mdx-deck is the best alternative for creating slide deck based on MDX: Markdown + React components.
If you really think to need, you can even use Marp React within these frameworks.
:information_source: See also Render Props in the document of React.
markdown-it plugins
You can use markdown-it plugins by configuring Marp object via init prop.
<Marp
markdown={text(
'Markdown',
`
::: columns
The delimiter \`:::\` should not be shown here.
:::
`
)}
init={marp => marp.use(markdownItContainer, 'columns')}
/>
<MarpWorker> component (Experimental)
For the best performance of the integrated web app, <MarpWorker> allows using Web Worker for Markdown conversion. It has a lot of clear advantages over a regular <Marp> component.
It does not block UI thread while converting large Markdown.
A blazing fast live preview by a simple but clever queueing system is available.
No longer need to include a huge Marp Core into main JS.
Web Worker will be loaded asynchronously, so the first paint will not block.
The renderer using worker may be default component of Marp React in future.
Basic usage
You can use it just by swapping from <Marp> to <MarpWorker>. By default, <MarpWorker> will use a pre-built worker via jsDelivr CDN.
import { MarpWorker } from '@marp-team/marp-react'
import React from 'react'
import ReactDOM from 'react-dom'
ReactDOM.render(
<MarpWorker markdown="# Hello, Marp Worker!" />,
document.getElementById('app')
)
<MarpWorker>'s custom renderer might be called with undefined slides argument, unlike <Marp>. It means an initial rendering of the component while preparing worker.
You may show waiting user a loading message as follows:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/marp-team/marp-react là nguồn chính thức.
marp-team/marp-react có bao nhiêu sao?
marp-team/marp-react có 26 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/marp-team/marp-react. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
marp-team/marp-react có những chủ đề gì?
GitHub topics của marp-team/marp-react: "marp", "react", "react-components". TopGit xếp repo vào nhóm Frontend.
marp-team/marp-react có trang demo không?
Dự án có trang chủ ở https://marp-react.netlify.com/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
marp-team/marp-react còn đang phát triển không?
Commit gần nhất trên marp-team/marp-react là 6.1 năm trước (theo timestamp GitHub). Repo có 4 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
marp-team/marp-react dùng license gì?
marp-team/marp-react phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
marp-team/marp-react viết bằng ngôn ngữ gì?
marp-team/marp-react chủ yếu viết bằng TypeScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về marp-react?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về marp-react.