Skip to content

Commit

Permalink
docs: adjust docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Jan 4, 2024
1 parent f7c2d81 commit 189e682
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion examples/core-react/001-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ toc: false
目前项目是基于 React 技术栈实现的,所以后缀都加了 `-react` 字眼,后续可能会将 Core 抽离成不依赖于技术栈的纯 JavaScript 项目,以便支持任何技术框架。
:::

FormRender、Search 没有很好的支持 SSR,如果是 Next.js 项目,可以动态导入并配置 ssr 为不启用,如下示例。

```jsx | pure
import dynamic from 'next/dynamic'

const FormRender = dynamic(() => import('@schema-render/form-render-react'), {
ssr: false,
})
```

## Core

渲染内核必须组装 `itemLayout`(表单项布局)、`Renderers`(渲染器集合)来实现一个渲染库,然后通过 JSON Schema 驱动渲染出所需的表单。
Expand All @@ -31,4 +41,4 @@ toc: false
- `协议驱动`:通过编写一份简易的 JSON Schema 来实现内容的渲染,参考[快速上手](./002-quick-start.md)
- `简洁易用`:仁者见仁智者见智,笔者以为是比较言简意赅、易用的,如同内部源码一样,化繁为简,无必要不增实体。
- `高可定制`:通过配置与组装 layout、itemLayout、renderers 等可以按需实现一个贴合业务自身的渲染库,如 FormRender。
- `轻量级`没有包依赖,编译后未压缩资源仅 16k, gzip 6k
- `轻量级`零依赖,资源包大小仅 18.8k, gzip 6.9k
2 changes: 1 addition & 1 deletion examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hero:
features:
- title: Core
emoji: 💎
description: 渲染内核:协议驱动、简洁易用、高可定制、轻量级零依赖(16.4k, gzip 6.3k
description: 渲染内核:协议驱动、简洁易用、高可定制、轻量级零依赖(18.8k, gzip 6.9k
link: /core-react/001-intro
- title: FormRender
emoji: 🚀
Expand Down

0 comments on commit 189e682

Please sign in to comment.