profile
viewpoint
QiChang Li QC-L @docschina NanJing, China Front-end Full Stack Engineer member of @nodejs and @reactjs

discountry/react 941

React docs in Chinese | React 中文文档翻译

hijiangtao/glmaps 236

Data visualization examples and tutorials from scratch. 数据可视化示例代码集与新手学习教程。

docschina/vuejs.org 232

[印记中文](https://docschina.org/) - Vue.js 中文文档

docschina/babeljs.io 36

[印记中文](https://docschina.org/) - :globe_with_meridians: Babel v7.0 中文文档

docschina/parceljs.io 25

[印记中文](https://docschina.org/) - 🌎 parcel 中文文档

QC-L/awesome-react-hooks-cn 7

Awesome React Hooks 中文版本

QC-L/-Api 1

:book:「一个」、「Time 时光」、「开眼」、「一席」、「梨视频」、「微软必应词典」、「金山词典」、「豆瓣电影」、「中央天气」、「魅族天气」、「每日一文」、「12306」、「途牛」、「快递100」、「快递」应用 Api。仅供学习,禁止商业使用,侵权请联系删除。

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha d3119bbe05db785490918c525f3848e05bb853ba

docs(cn): fix conflicts

view details

push time in 2 minutes

issue commentremaxjs/create-remax-app

添加 gitignore

收~

yesmeck

comment created time in 5 days

delete branch docschina/Recoil

delete branch : basic-tutorial

delete time in 7 days

push eventdocschina/Recoil

Sunny Xue

commit sha 9046b8c5addffc55543788bb00a03ca195bd5aea

docs(cn): translate docs/docs/basic-tutorial into Chinese (#7)

view details

push time in 7 days

PR merged docschina/Recoil

docs(cn): translate docs/docs/basic-tutorial into Chinese

翻译Basic Tutorial(基础教程)的3个文件

  • 介绍(intro.md)
  • atoms.md
  • selectors.md
+44 -44

4 comments

3 changed files

Sunnysit

pr closed time in 7 days

delete branch docschina/Recoil

delete branch : sync-f2edd6be

delete time in 7 days

push eventdocschina/Recoil

Chris Gomez

commit sha c79f084ebb31cadfceffbbf1a309a2d7459fa691

doc: document persistance.

view details

Chris Gomez

commit sha 9382f608811c722ec39b562b6c1acabefeb0f443

docs: fixing writing

view details

Chris Gomez

commit sha 484318497353086bbb6422e0640818c3127631ae

removing setIsReadyState

view details

Douglas Armstrong

commit sha 264465b730cb424ed9659175576947ea3b8966d4

Merge pull request #90 from chiscoder/doc/document-persistence [docs] document persistence.

view details

Douglas Armstrong

commit sha efda92b494dea23ef4d40e01453c91445b88e38b

Improve state persistence documentation

view details

Douglas Armstrong

commit sha f6f7c126fbf8a453f84555399fb36b4ce206b510

Merge pull request #157 from drarmstr/docs [docs] Improve state persistence documentation

view details

Douglas Armstrong

commit sha bba60e83570738d6fb2f6cbbbb5148e1212588cf

Improve documentation linking, stub for async state sync, and polish some content.

view details

Douglas Armstrong

commit sha f48ceb06ce25dca7eaa3139c893354bcae0f5492

Merge pull request #158 from drarmstr/docs [docs] Improve documentation linking, stub for async state sync, ...

view details

Douglas Armstrong

commit sha 9546c7aba4430d2d81554ae608e32a48f79b4cf2

[docs] initial docs for syncing state

view details

Douglas Armstrong

commit sha e37704379e13c11c4ed4afed8da553157e3aae96

Merge pull request #159 from drarmstr/docs [docs] initial docs for syncing state

view details

hafiz feranmi

commit sha 5c4265831ab5e5a396b43022db2dcf8dc9259274

Fixed a typographical error

view details

Douglas Armstrong

commit sha 99e2aa893f66a7e6a4e250fec45626c3eb05be14

Merge pull request #166 from hafizferanmi/patch-1 [docs] Fixed a typographical error

view details

Douglas Armstrong

commit sha 647b997fc07bfa4650bd38caf86249044be41f9a

[docs] Fix bi-directional syncing example

view details

Douglas Armstrong

commit sha 8c31da3fb0c07d0787e02ee252fc699c22fdca8f

[docs] Fix bi-directional syncing example

view details

Douglas Armstrong

commit sha 9c583f42dafe5ce408ace13faf1fef71f8fbf353

Merge branch 'docs' of https://github.com/drarmstr/Recoil into docs

view details

Douglas Armstrong

commit sha 3b3219b99134f6714ead4e1ae470e2103ba582ac

Merge branch 'docs' of https://github.com/drarmstr/Recoil into docs

view details

Douglas Armstrong

commit sha fc55d27ed9f53aa638f3da41dfb7634ec3bc8c18

Merge branch 'docs' of https://github.com/drarmstr/Recoil into docs

view details

Douglas Armstrong

commit sha f2edd6bec9db35bd999e692b046556827f22f44e

Merge pull request #167 from drarmstr/docs [docs] Fix bi-directional syncing example

view details

docschina-bot

commit sha fd6b2a7fa9225f5408fd47c6a4f99e7c135a0da6

docs(en): merging all conflicts

view details

QC-L

commit sha 70a02ce0d70260c90f1af5797d3eb80688502857

docs(cn): fix conflicts

view details

push time in 7 days

PR merged docschina/Recoil

Reviewers
docs(en): merge Recoil into docschina/docs @ f2edd6be

此 PR 自动生成。

合并 facebookexperimental/Recoil 的修改至本仓库(@ f2edd6be)

以下文件存在冲突,可能需要重新翻译:

请解决所有冲突后提交到此 pull request,可直接在 Github 修改、切换到 sync-f2edd6be 分支进行修改或者使用 Github Desktop 拉取此 pr 修改并提交。

禁止使用 Squash Merge 来合并此 Pull Request!

使用该操作会导致上游仓库的内容丢失,并致使下一次合并产生冲突。

+300 -15

1 comment

7 changed files

docschina-bot

pr closed time in 7 days

push eventdocschina/Recoil

QC-L

commit sha 70a02ce0d70260c90f1af5797d3eb80688502857

docs(cn): fix conflicts

view details

push time in 7 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha 2892a04949bd1ea5695a37d9c8ff9540db1836fb

deploy pages [ci skip]

view details

push time in 7 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha b7fb530fa0aed8012c29b7738e78ca2bb18b0adb

deploy pages [ci skip]

view details

push time in 7 days

push eventreactjs/zh-hans.reactjs.org

dendoink

commit sha f347059f9390c374d9ab0e172ae7cdc6c4eb435f

docs(cn): fix render props translation (#404)

view details

push time in 7 days

PR merged reactjs/zh-hans.reactjs.org

docs(cn): fix render props translation

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->

English version: Here’s where the render prop comes in: Instead of hard-coding a <Cat> inside a <Mouse> component, and effectively changing its rendered output, we can provide <Mouse> with a function prop that it uses to dynamically determine what to render–a render prop.

Old version: 这也是 render prop 的来历:我们可以提供一个带有函数 prop 的 <Mouse> 组件,它能够动态决定什么需要渲染的,而不是将 <Cat> 硬编码到 <Mouse> 组件里,并有效地改变它的渲染结果。

New version: 相比于直接将 <Cat> 写死在 <Mouse> 组件中,并且有效的更改渲染的结果,我们可以为 <Mouse> 提供一个函数 prop 来动态的确定要渲染什么 – 一个 render prop

+3 -3

1 comment

1 changed file

dendoink

pr closed time in 7 days

delete branch reactjs/zh-hans.reactjs.org

delete branch : sync-f81b909c

delete time in 7 days

push eventreactjs/zh-hans.reactjs.org

a-oz

commit sha 4e0e1eb87099e32f3bad44bd05ca78c22a9f9169

Update lists-and-keys.md: eliminate huge space between properties (#2980)

view details

Jack Hsu

commit sha f81b909ce97dc253998a192f367551cb2b40d66f

Add a link to Nx under the Flexible Toolchains section (#2979)

view details

reactjs-translation-bot

commit sha f4d2798ae042730608578ba6c93acfa6dc81ad42

merging all conflicts

view details

QC-L

commit sha f0a694e5ec5b7a27f005a60fe5da8ef5e853fae3

docs(cn): fix conflicts

view details

QiChang Li

commit sha 20fe54cd1056854dcc82405a1f8364bddf6b29e4

docs(cn): merge reactjs.org into zh-hans @ f81b909c

view details

push time in 7 days

PR merged reactjs/zh-hans.reactjs.org

Reviewers
docs(cn): merge reactjs.org into zh-hans @ f81b909c

This PR was automatically generated.

Merge changes from reactjs.org at f81b909c

The following files have conflicts and may need new translations:

Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch.

DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will "erase" the commits from master and cause them to show up as conflicts the next time we merge.

+3 -2

1 comment

2 changed files

reactjs-translation-bot

pr closed time in 7 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha f0a694e5ec5b7a27f005a60fe5da8ef5e853fae3

docs(cn): fix conflicts

view details

push time in 7 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha 71a9f27ac2fc477a54c952048911919c19246b9c

deploy pages [ci skip]

view details

push time in 8 days

push eventdendoink/zh-hans.reactjs.org

QiChang Li

commit sha a3ae8bae83a9c89c9fbde779f6a01c1f2f68487a

Update content/docs/render-props.md

view details

push time in 8 days

push eventreactjs/zh-hans.reactjs.org

Tinc0ist

commit sha 90a1c4f64f36d954763c1eca54691a415ab04cdc

docs(cn): fix issues spell in content/docs/release-channels.md (#406)

view details

push time in 8 days

PR merged reactjs/zh-hans.reactjs.org

docs(cn): fix issues spell in content/docs/release-channels.md

fix a wrong spell

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->

+1 -1

1 comment

1 changed file

tincochan

pr closed time in 8 days

push eventdocschina/Recoil

QiChang Li

commit sha ca9c44b3c586bc2fb294c9427e43e3abaeabd138

Update docs/docs/basic-tutorial/intro.md

view details

push time in 8 days

Pull request review commentdocschina/Recoil

docs(cn): translate docs/docs/basic-tutorial into Chinese

 ----title: Intro+title: 介绍
title: 简介
Sunnysit

comment created time in 8 days

Pull request review commentdocschina/Recoil

docs(cn): translate docs/docs/basic-tutorial into Chinese

 const filteredTodoListState = selector({ }); ``` -The `filteredTodoListState` internally keeps track of two dependencies: `todoListFilterState` and `todoListState` so that it re-runs if either of those change.+`filteredTodoListState` 在内部跟踪两个依赖项:`todoListFilterState` 和 `todoListState`,以便在其中任何一个更改时重新运行。 -> From a component's point of view, selectors can be read using the same hooks that are used to read atoms. However it's important to note that certain hooks only work with **writable state** (i.e `useRecoilState()`). All atoms are writable state, but only some selectors are considered writable state (selectors that have both a `get` and `set` property). See the [Core Concepts](/docs/introduction/core-concepts) page for more information on this topic.+> 从组件的角度来看,selector 可以使用与读取 atom 相同的 hook 来读取。不过务必注意,某些 hook 仅适用于**可写状态(writable state)**,例如 `useRecoilState()`。所有 atom 都是可写状态,但只有一些 selector 可被视为可写状态(同时具有 `get` 和 `set` 属性的 selector)。请参阅[核心概念](/docs/introduction/core-concepts)页面了解更多关于此主题的信息。 -Displaying our filtered todoList is as simple as changing one line in the `TodoList` component:+要显示过滤后的待办事项列表只需要在`TodoList`组件中更改一行代码就能实现:
要显示过滤后的 TodoList 只需要在 `TodoList` 组件中更改一行代码就能实现:
Sunnysit

comment created time in 9 days

Pull request review commentdocschina/Recoil

docs(cn): translate docs/docs/basic-tutorial into Chinese

 function TodoListFilters() { } ``` -With a few lines of code we've managed to implement filtering! We'll use the same concepts to implement the `TodoListStats` component.+通过几行代码,我们成功实现了过滤筛选! 我们将使用相同的概念来实现 `TodoListStats` 组件。 -We want to display the following stats:+我们要显示以下统计信息: -- Total number of todo items-- Total number of completed items-- Total number of uncompleted items-- Percentage of items completed+- 待办事项总数
- Todo Item 总数
Sunnysit

comment created time in 9 days

startedbitwiseshiftleft/sjcl

started time in 9 days

pull request commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

通篇改下待办事件清单吧?

Sunnysit

comment created time in 9 days

Pull request review commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

 title: Atoms --- -Atoms contain the source of truth for our application state. In our todo-list, the source of truth will be an array of objects, with each object representing a todo item.+Atoms 包含我们应用中状态的来源。在我们的待办事项清单(todo-list)中,来源将会是一个对象数组,每个对象代表一个待办事项(todo-item)。

英译中之后,英文就没有复数了~

Sunnysit

comment created time in 9 days

pull request commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

Todo List 要不不翻译了吧?翻译成待办事件清单挺难受的...

Sunnysit

comment created time in 10 days

Pull request review commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

 function removeItemAtIndex(arr, index) { } ``` -And with that we've got a fully functional todo list! In the next section we'll see how we can use selectors to take our list to the next level.+有了它,我们就有了功能齐全的待办事项清单! 在下一节中,我们将看到如何使用 selectors 让待办事项清单更进一步。
有了它,我们就有了函数式的 TodoList!在下一节中,我们将看到如何使用 selectors 让 TodoList 更进一步。
Sunnysit

comment created time in 10 days

Pull request review commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

 function getId() { } ``` -Notice we use the **updater** form of the setter function so that we can create a new todo list based on the old todo list.+注意,我们在 setter 函数中使用**更新器(updater)**的形式,以便我们可以基于旧的待办事项列表创建新的待办事项列表。 -The `TodoItem` component will display the value of the todo item while allowing you to change its text and delete the item. We use `useRecoilState()` to read `todoListState` and to get a setter function that we use to update the item text, mark it as completed, and delete it:+`TodoItem`组件将显示待办事项的值,同时允许你更改其文本和删除它。 我们使用`useRecoilState()`读取`todoListState`并获取一个 setter 函数,该函数用于更新项目文本,将其标记为完成并删除它:
`TodoItem` 组件将显示待办事项的值,同时允许你更改其文本和删除它。 我们使用 `useRecoilState()` 读取 `todoListState` 并获取一个 setter 函数,该函数用于更新项目文本,将其标记为完成并删除它:
Sunnysit

comment created time in 10 days

Pull request review commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

 function TodoList() { } ``` -The commented-out components will be implemented in the sections that follow.+注释里的组件将在后面的章节中实现。 -To create new todo items, we need to access a setter function that will update the contents of the `todoListState`. We can use the `useSetRecoilState()` hook to get a setter function in our `TodoItemCreator` component:+要创建新的待办事项,我们需要访问一个 setter 函数,该函数将更新`todoListState`的内容。 我们可以使用`useSetRecoilState()` hook 在`TodoItemCreator`组件中获取一个 setter 函数:
要创建新的待办事项,我们需要访问一个 setter 函数,该函数将更新 `todoListState` 的内容。我们可以使用 `useSetRecoilState()` hook 在 `TodoItemCreator` 组件中获取一个 setter 函数:
Sunnysit

comment created time in 10 days

Pull request review commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

 const todoListState = atom({ }); ``` -We give our atom a unique `key` and set the `default` value to an empty array. To read the contents of this atom, we can use the `useRecoilValue()` hook in our `TodoList` component:+我们为该 atom 设定一个唯一的`键(key)`,并将`默认值`设置为一个空数组。 要读取该 atom 的内容,我们可以在`TodoList`组件中使用`useRecoilValue()` hook:
我们为该 atom 设定一个唯一的 `key`,并将`默认值`设置为一个空数组。 要读取该 atom 的内容,我们可以在 `TodoList` 组件中使用 `useRecoilValue()` hook:
Sunnysit

comment created time in 10 days

Pull request review commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

 title: Atoms --- -Atoms contain the source of truth for our application state. In our todo-list, the source of truth will be an array of objects, with each object representing a todo item.+Atoms 包含我们应用中状态的来源。在我们的待办事项清单(todo-list)中,来源将会是一个对象数组,每个对象代表一个待办事项(todo-item)。 -We'll call our list atom `todoListState` and create it using the `atom()` function:+我们将列表的 atom 称为`todoListState`,并使用`atom()`函数创建它:
我们将列表的 atom 称为 `todoListState`,并使用 `atom()` 函数创建它:
Sunnysit

comment created time in 10 days

Pull request review commentdocschina/Recoil

Basic Tutorial (基础教程)翻译

 title: Atoms --- -Atoms contain the source of truth for our application state. In our todo-list, the source of truth will be an array of objects, with each object representing a todo item.+Atoms 包含我们应用中状态的来源。在我们的待办事项清单(todo-list)中,来源将会是一个对象数组,每个对象代表一个待办事项(todo-item)。

Atoms -> Atom

Sunnysit

comment created time in 10 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha 66b6e44a6fd6e4a656b4b9d4ef270bf0a9edcee0

deploy pages [ci skip]

view details

push time in 10 days

delete branch reactjs/zh-hans.reactjs.org

delete branch : add-hooks-post

delete time in 10 days

push eventreactjs/zh-hans.reactjs.org

QiChang Li

commit sha 7e8e88836897978bdbe52c07a47ec2f7a4284d0a

docs(cn): add new blog with hook (#405)

view details

push time in 10 days

PR merged reactjs/zh-hans.reactjs.org

docs(cn): add new blog with hook

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->

+853 -0

1 comment

1 changed file

QC-L

pr closed time in 10 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha 1060ccb39caf38dd62ff0efa7a5a9f07eee3ca2f

docs(cn): fix error

view details

push time in 11 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha 05a02fc488bd4bd37565807de426b0e550a70542

docs(cn): update info

view details

push time in 11 days

PR opened reactjs/zh-hans.reactjs.org

docs(cn): add new blog with hook

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->

+853 -0

0 comment

1 changed file

pr created time in 11 days

create barnchreactjs/zh-hans.reactjs.org

branch : add-hooks-post

created branch time in 11 days

startedcloud-sn/uxcool

started time in 11 days

startedvitejs/vite-plugin-react

started time in 11 days

startedlizhe2004/chatbot-list

started time in 11 days

push eventdocschina/webpack.js.org

晨皓

commit sha 8c8bc0e56feaa685ab3a17c34c5a744097b9cf81

docs(cn): solve console spell in src/content/guides/development.md (#716)

view details

push time in 12 days

PR merged docschina/webpack.js.org

docs(cn): solve console spell in src/content/guides/development.md

describe your changes...

  • [ ] Read and sign the CLA. PRs that haven't signed it won't be accepted.
  • [ ] Make sure your PR complies with the writer's guide.
  • [ ] Review the diff carefully as sometimes this can reveal issues.
  • [ ] Do not abandon your Pull Request: Stale Pull Requests.
  • Remove these instructions from your PR as they are for your eyes only.
+1 -1

1 comment

1 changed file

ChenHaoCH

pr closed time in 12 days

MemberEvent

starteddocschina/Recoil

started time in 12 days

pull request commentfacebookexperimental/Recoil

[docs/chinese] Translate official document to Chinese(Simplified)

@Sunnysit All right!

Sunnysit

comment created time in 12 days

pull request commentfacebookexperimental/Recoil

[docs/chinese] Translate official document to Chinese(Simplified)

@Sunnysit How to contact you? wechat or twitter?

Sunnysit

comment created time in 12 days

pull request commentfacebookexperimental/Recoil

[docs/chinese] Translate official document to Chinese(Simplified)

@Sunnysit We can translate together.

Sunnysit

comment created time in 12 days

delete branch docschina/Recoil

delete branch : sync-13f61990

delete time in 12 days

push eventdocschina/Recoil

Wzb3422

commit sha bb2518d78680052c2b80e46d924e8e365f99b4b4

Add missing dot

view details

Firat Özcan

commit sha 094e3babc41a6e7a0bfc39b406fe53065f594113

Changed fieldname for useRecoilValueLoadable hook May be that it was status before but right now getting the current state of the useRecoilValueLoadable is done via the `state` field instead of `status`

view details

Douglas Armstrong

commit sha c533b8759874d7583a17f799870483c776e3fb31

Merge pull request #124 from firatoezcan/patch-1 [docs] Changed fieldname for useRecoilValueLoadable hook

view details

Douglas Armstrong

commit sha e002f47babba5baf3b2790a8175dbd0e5c104037

Merge pull request #119 from Wzb3422/patch-1 [docs] Add missing dot

view details

Douglas Armstrong

commit sha a9366cf9ed5188c700cc3c6ca6afbd8ac0de80b0

minor typo

view details

Douglas Armstrong

commit sha d38838397eb0de04afe7a08798385e63504ed72f

Merge branch 'docs' of https://github.com/facebookexperimental/Recoil into docs

view details

Douglas Armstrong

commit sha 13f61990ca195ee6bcfe36411caf4f2aab073ff4

Merge pull request #130 from drarmstr/docs [docs] Minor typo

view details

docschina-bot

commit sha b317094b3b6c7ce3c77acdfc29d77e8322642d53

docs(en): merging all conflicts

view details

QiChang Li

commit sha 9a374a040c17986daad13ec8400a3998c36244a3

docs(cn): fix conflicts

view details

QiChang Li

commit sha b2efab9da4a18b396eeedd39c312c1bbbda6af85

docs(en): merge Recoil into docschina/docs @ 13f61990

view details

push time in 12 days

PR merged docschina/Recoil

Reviewers
docs(en): merge Recoil into docschina/docs @ 13f61990

此 PR 自动生成。

合并 facebookexperimental/Recoil 的修改至本仓库(@ 13f61990)

以下文件存在冲突,可能需要重新翻译:

请解决所有冲突后提交到此 pull request,可直接在 Github 修改、切换到 sync-13f61990 分支进行修改或者使用 Github Desktop 拉取此 pr 修改并提交。

禁止使用 Squash Merge 来合并此 Pull Request!

使用该操作会导致上游仓库的内容丢失,并致使下一次合并产生冲突。

+1 -1

1 comment

1 changed file

docschina-bot

pr closed time in 12 days

push eventdocschina/Recoil

QiChang Li

commit sha 9a374a040c17986daad13ec8400a3998c36244a3

docs(cn): fix conflicts

view details

push time in 12 days

pull request commentfacebookexperimental/Recoil

[docs/chinese] Translate official document to Chinese(Simplified)

recoil.docschina.org

Sunnysit

comment created time in 12 days

Pull request review commentreactjs/zh-hans.reactjs.org

Fix/render props 2

 class MouseTracker extends React.Component {  这种方法适用于我们的特定用例,但我们还没有达到以可复用的方式真正封装行为的目标。现在,每当我们想要鼠标位置用于不同的用例时,我们必须创建一个新的组件(本质上是另一个 `<MouseWithCat>` ),它专门为该用例呈现一些东西. -这也是 render prop 的来历:我们可以提供一个带有函数 prop 的 `<Mouse>` 组件,它能够动态决定什么需要渲染的,而不是将 `<Cat>` 硬编码到 `<Mouse>` 组件里,并有效地改变它的渲染结果。+这也是 render prop 的来历:相比于直接将 `<Cat>` 写死在 `<Mouse>` 组件中,并且有效的更改渲染的结果,我们可以为 `<Mouse>` 提供一个函数 prop 来动态的确定要渲染什么 – 一个 render prop
这也是 render prop 的来历:相比于直接将 `<Cat>` 写死在 `<Mouse>` 组件中,并且有效的更改渲染的结果,我们可以为 `<Mouse>` 提供一个函数 prop 来动态的确定要渲染什么 —— 一个 render prop
dendoink

comment created time in 13 days

startedvitejs/create-vite-app

started time in 13 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha 7c5fbacea92be5e2d8389eaa47b95043bb18ad73

deploy pages [ci skip]

view details

push time in 13 days

push eventreactjs/zh-hans.reactjs.org

dendoink

commit sha 17b8c241eb039856f09b948ed692e729886490c4

docs(cn): optimize semantics in content/docs/render-props.md (#403)

view details

push time in 13 days

PR merged reactjs/zh-hans.reactjs.org

docs(cn): optimize semantics in content/docs/render-props.md

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

--> Change : 组件是 React 代码复用的主要单元,但如何分享一个组件封装到其他需要相同 state 组件的状态或行为并不总是很容易。 To: 组件是 React 代码复用的主要单元,但如何将一个组件封装的状态或行为共享给其他需要相同状态的组件并不总是显而易见。

+1 -1

1 comment

1 changed file

dendoink

pr closed time in 13 days

startedjakejarvis/lighthouse-action

started time in 13 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha ba659f0a4cea52e0ce20c497cf508112a4b5e3e8

deploy pages [ci skip]

view details

push time in 14 days

push eventreactjs/zh-hans.reactjs.org

steven

commit sha a1df69410f2dd164071d0193a85d3fc4fb910e3d

docs(cn): fix link in content/docs/reference-glossary.md (#402)

view details

push time in 14 days

PR merged reactjs/zh-hans.reactjs.org

docs(cn): fix link in content/docs/reference-glossary.md

Add missing link

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->

+1 -1

1 comment

1 changed file

hulk04

pr closed time in 14 days

push eventremaxjs/create-remax-app

QC-L

commit sha 9b2e55a185a36e8d6b0b14ad31feea055e527b93

v2.0.5

view details

push time in 15 days

push eventdocschina/webpack.js.org

Sam Chen

commit sha 70997ff484c57b9eefccd31376873609f697447e

docs(plugins): update internal plugins (#3737)

view details

jeffin sam

commit sha 1f5f5a01d9b16f6d0cebd7fa843a459f39ef89e8

Docs(plugin): Remove NoHotModuleReplacementPlugin from internal-plugin (#3736)

view details

Sam Chen

commit sha 4ac96c9cbb77d37d78648d9f0e33876a5659c61c

docs(plugins): clean option (#3733)

view details

Sam Chen

commit sha 03430a723289c0eb9bd6618a63ffde2595424d60

docs(concepts): add module federation (#3732)

view details

Eugene Hlushko

commit sha 1802aed296a4ec2e5eca3b126f369de23160bf9e

docs(concepts) add order to the new page and small corr (#3738)

view details

Fernando Montoya

commit sha 04c7f4debdaf279c7412a839d9454c69906ad8d2

chore(site): Add Vercel logo to footer (#3729)

view details

jeffin sam

commit sha e7e37e6f885dc1f661ff3475b4a12dfd95574097

multiple files per entry using array for dependOn (#3730)

view details

Christian Hoff

commit sha 92fa2a7ba4f1fb4280675a8b1dc615dc50c63362

Fix name of dev-tool name in description (#3742) The used value "cheap-module-eval-source-map" doesn't exist (maybe anymore) and "eval-cheap-module-source-map" should be used instead

view details

Christian Hoff

commit sha 952ac78213d6db9dc88bf1cfc2a9253093d775f3

Fix name of dev-tool name in description (#3741) The used value "cheap-module-eval-source-map" doesn't exist (maybe anymore) and "eval-cheap-module-source-map" should be used instead

view details

Sam Chen

commit sha 3db764b40d84695aa875b820aebbaff76fe44395

docs: update argument name (#3725)

view details

Joel Denning

commit sha dfa3a6f1ad56e0f45a059d6c2fa401a9c79f31f2

Add documentation for __system_context__ (#3710)

view details

jeffin sam

commit sha b4bff1440fa3eadd863d7f0cf49359952f479f4d

Docs(plugin) : Add ContextExclusionPlugin (#3646)

view details

Albus Dumbledore

commit sha 2deb7b29197d0205d9d66849bf645557a803bc0d

docs(configuration): Improve experiments.md (#3660)

view details

docschina-bot

commit sha de5e5b681703d3c93f230e4e72dc17a92c288893

docs(en): merging all conflicts

view details

lizhihua

commit sha 73e141560952767d8a9ce23d6074d9ca7b69c19b

fix: 解决冲突

view details

QiChang Li

commit sha 3e2d6397d71188ac5f53c16a561e75d0d56ff178

docs(en): merge webpack.js.org into docschina/cn @ 2deb7b29

view details

push time in 15 days

delete branch docschina/webpack.js.org

delete branch : sync-2deb7b29

delete time in 15 days

PR merged docschina/webpack.js.org

Reviewers
docs(en): merge webpack.js.org into docschina/cn @ 2deb7b29

此 PR 自动生成。

合并 webpack/webpack.js.org 的修改至本仓库(@ 2deb7b29)

以下文件存在冲突,可能需要重新翻译:

请解决所有冲突后提交到此 pull request,可直接在 Github 修改、切换到 sync-2deb7b29 分支进行修改或者使用 Github Desktop 拉取此 pr 修改并提交。

禁止使用 Squash Merge 来合并此 Pull Request!

使用该操作会导致上游仓库的内容丢失,并致使下一次合并产生冲突。

+202 -74

1 comment

17 changed files

docschina-bot

pr closed time in 15 days

issue openedQC-L/blog

从 Vue 源码学习编译及 TypeScript(一) —— parse

最近在学习 TS 和编译相关的,为了加深学习笔者参考了 vue-next 的 complier-core 部分。

准备

目录结构

在开始源码阅读前,需要掌握一些基本信息,如项目依赖,构建方式,配置文件等。

首先,先来了解下整个目录的大体结构:

.
├── __tests__/
├── api-extractor.json
├── dist/
├── index.js
├── node_modules/
├── package.json
└── src/

从以上目录及文件信息,我们可以得知如下信息:

  1. 此 package 依赖了 estree-walkersource-map 以及 babel
  2. package.json 中不包含 scripts 字段,说明由全局统一构建;
  3. 项目构建用到了微软的 @microsoft/api-extractor
  4. 测试框架采用了 Jest。
  5. 此 package 的入口为 index.js,而 index.js 根据环境 NODE_ENV,区分了是否为 production

了解了基本信息之后,我们先来编译一下 complier-core 部分:

yarn build compiler-core -t

编译后,dist 目录内容如下:

├── dist
    ├── compiler-core.cjs.js         # 包含异常的 cjs
    ├── compiler-core.cjs.prod.js    # 用于生产的 cjs
    ├── compiler-core.d.ts           # ts 声明文件
    └── compiler-core.esm-bundler.js # 用于 esm 的构建器

了解了基本的项目结构后,我们再来了解下编译。

编译原理

这里以 Babel 为例,简单介绍下相关的编译原理:

Babel 采用 AST 的形式(Abstract Syntax Tree,抽象语法树)对 JavaScript 源代码进行处理。

具体工作流参照下图:

Babel v7

Babel 中不同的 package 完成不同的工作。

  • @babel/parser 将源码解析生成 AST
    1. 词法分析(Lexical analysis)
    2. 语法分析(Syntax analysis)
    3. 语义分析(Semantic analysis)
  • @babel/traverse 转换修改 AST
  • @babel/generator 根据 AST 生成新的源码,但并不会帮你格式化代码(可以使用 prettier)
  • @babel/core 核心库,很多 Babel 组件依赖,用于加载 preset 和 plugin
  • @babel/types types 包含所有 AST 中使用的类型,便于修改 AST
  • @babel/template 采用 template 的形式简化修改 AST 的过程

ps: 编译器基本原理相似,因此,对比学习的方式最佳。

complier-core 概览

了解了 Babel 的大概原理,那我们再来看看 complier-core/src 中的文件:

└── src
    ├── ast.ts
    ├── codegen.ts
    ├── compile.ts
    ├── errors.ts
    ├── index.ts
    ├── options.ts
    ├── parse.ts
    ├── runtimeHelpers.ts
    ├── transform.ts
    ├── transforms
    │   ├── hoistStatic.ts
    │   ├── noopDirectiveTransform.ts
    │   ├── transformElement.ts
    │   ├── transformExpression.ts
    │   ├── transformSlotOutlet.ts
    │   ├── transformText.ts
    │   ├── vBind.ts
    │   ├── vFor.ts
    │   ├── vIf.ts
    │   ├── vModel.ts
    │   ├── vOn.ts
    │   ├── vOnce.ts
    │   └── vSlot.ts
    └── utils.ts

看完目录,我们就基本能找到对应关系,也基本能了解每个 ts 文件的作用:

  • parse 等价于 @babel/parser
  • transform 等价于 @babel/traverse
  • codegen 等价于 @babel/generator

我们把 Babel 的图替换下,得出下图:

vue-next-complier

这里我们来贴一段源码,大家就可以理解:

function baseCompile(template, options = {}) {
    // ...
    const prefixIdentifiers =  (options.prefixIdentifiers === true || isModuleMode);
    // ...
    const ast = shared.isString(template) ? baseParse(template, options) : template;
    const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers);
    transform(ast, {
        ...options,
        prefixIdentifiers,
        nodeTransforms: [
            ...nodeTransforms,
            ...(options.nodeTransforms || []) // user transforms
        ],
        directiveTransforms: {
            ...directiveTransforms,
            ...(options.directiveTransforms || {}) // user transforms
        }
    });
    return generate(ast, {
        ...options,
        prefixIdentifiers
    });
}

ps: 代码中省略了异常处理部分,只保留了核心代码,便于理解。

从上述代码中,我们可以看出 compiler-core 预留了 options.nodeTransforms,也就意味着 AST 转换部分支持自定义

大致了解了 complier-core 所做的事,那我们使用 complier-core 来编译一段 vue template 的代码。

编译

官方推出了 vue-next-template-explorer 供大家预览,所以这里我们使用此网站进行编译

编译前:

<div v-if="item.isShow" v-for="(item, index) in items">{{item.name}}</div>

编译后:

import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, toDisplayString as _toDisplayString, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from "vue"

export function render(_ctx, _cache) {
  return (_ctx.item.isShow)
    ? (_openBlock(true), _createBlock(_Fragment, { key: 0 }, _renderList(_ctx.items, (item, index) => {
        return (_openBlock(), _createBlock("div", null, _toDisplayString(item.name), 1 /* TEXT */))
      }), 256 /* UNKEYED_FRAGMENT */))
    : _createCommentVNode("v-if", true)
}

template 经过 complier-core 编译后,会被转换为 render 函数。

了解了转换结果,我们开始正式的 complier 的学习。

Parse 阶段 —— template -> AST

如图中所示,vue 的 template 模板会被转成 AST,这个过程对应代码中的 parse.ts

接下来会分为两部分去分析 Parse,一是 TypeScript,二则是 Parse 的核心逻辑。

ps: 由于 index.ts 是将所有 ts 文件引入并导出,因此不做过多解释。

1.TypeScript

基础语法请参考 TS 官方文档,这里只讲解一些实用的内容。

先来看这样一个 type:

type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> &
  Pick<ParserOptions, OptionalOptions>
  • Required
  • Pick
  • Omit

Required

/**
 * Make all properties in T required
 */
type Required<T> = {
    [P in keyof T]-?: T[P];
};

其实很好理解,字面意思,就是必须的(必选项)。

其中 -? 为核心操作,将可选变为必选

与之对应的,是 Partial, 将选项变为可选

除此之外,keyof 有必要介绍下。

keyof

keyof 有点像 Object.keys,会取出 interface 中的所有 key,并产生联合类型。

Pick

/**
 * From T, pick a set of properties whose keys are in the union K
 */
type Pick<T, K extends keyof T> = {
    [P in K]: T[P];
};

复杂内容简单化,将 K extends keyof T 单独提取出来。

K extends keyof T 这里的含义是,K 包含在 keyof T 的键联合类型内。

从 T 中取出联合类型 K 的属性,并生成新的 type。

Omit

/**
 * Exclude from T those types that are assignable to U
 */
type Exclude<T, U> = T extends U ? never : T;

/**
 * Construct a type with the properties of T except for those in type K.
 */
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;

其中 Exclude 代表移除掉 T 中 U 相关的属性。

Omit 则为移除 T 中联合类型 K 的属性,并生成新的 type。

解释 MergedParserOptions

type OptionalOptions = 'isNativeTag' | 'isBuiltInComponent'
type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> &
  Pick<ParserOptions, OptionalOptions>

其实简单来说,interface ParserOptions 中与联合类型 OptionalOptions 所对应的属性为可选项,而除了联合类型 OptionalOptions 外的属性为必填项。

验证

下方源码中为默认的 parser 选项,除了 isNativeTagisBuiltInComponent 以外,均为默认值。

export const defaultParserOptions: MergedParserOptions = {
  delimiters: [`{{`, `}}`],
  getNamespace: () => Namespaces.HTML,
  getTextMode: () => TextModes.DATA,
  isVoidTag: NO,
  isPreTag: NO,
  isCustomElement: NO,
  decodeEntities: (rawText: string): string =>
    rawText.replace(decodeRE, (_, p1) => decodeMap[p1]),
  onError: defaultOnError
}

以上是 parse.ts 文件中稍微高级一些的 ts 用法,用到了 Utility Types

2.Parse 核心逻辑

在学习核心逻辑之前,我们看看 vue-next 是如何对编译器进行调试的。

本地调试

在文章开始时,我们提到了 vue-next-template-explorer,这个工具除了给大家学习参考外,也是编译器的调试工具。

翻看源码时,发现了 template-explorer 的启动命令

yarn dev-compiler
yarn open

template-explorer

接下来,我们就可以对源代码为所欲为了~

核心逻辑

我们继续沿用,文章开始的例子(因为例子中包含了 if 和 for):

<div v-if="item.isShow" v-for="(item, index) in items">{{item.name}}</div>

我们先找到 Parse 的主函数 baseParse

export function baseParse(
  content: string,
  options: ParserOptions = {}
): RootNode {
  const context = createParserContext(content, options)
  const start = getCursor(context)
  return createRoot(
    parseChildren(context, TextModes.DATA, []),
    getSelection(context, start)
  )
}

我们在最开始已经了解了 template 在 parse 阶段,会被编译成 AST。

由此可以得知,上述代码中 root 为解析后的 AST 对象,其类型为 RootNode。

AST 本质上就是一个 JSON 对象,让我们来看看上述 template 的 AST 的基本结构:

{
  "type": 0,
  "children": [
    {
      "type": 1,
      "ns": 0,
      "tag": "div",
      "tagType": 0,
      "props": [
        {
          "type": 7,
          "name": "if",
          "exp": {
            "type": 4,
            "content": "item.isShow",
            "isStatic": false,
            "isConstant": false,
            "loc": {
              "start": {
                "column": 12,
                "line": 1,
                "offset": 11
              },
              "end": {
                "column": 23,
                "line": 1,
                "offset": 22
              },
              "source": "item.isShow"
            }
          },
          "modifiers": [],
          "loc": {
            "start": {
              "column": 6,
              "line": 1,
              "offset": 5
            },
            "end": {
              "column": 24,
              "line": 1,
              "offset": 23
            },
            "source": "v-if=\"item.isShow\""
          }
        },
        {
          "type": 7,
          "name": "for",
          "exp": {
            "type": 4,
            "content": "(item, index) in items",
            "isStatic": false,
            "isConstant": false,
            "loc": {
              "start": {
                "column": 32,
                "line": 1,
                "offset": 31
              },
              "end": {
                "column": 54,
                "line": 1,
                "offset": 53
              },
              "source": "(item, index) in items"
            }
          },
          "modifiers": [],
          "loc": {
            "start": {
              "column": 25,
              "line": 1,
              "offset": 24
            },
            "end": {
              "column": 55,
              "line": 1,
              "offset": 54
            },
            "source": "v-for=\"(item, index) in items\""
          }
        }
      ],
      "isSelfClosing": false,
      "children": [
        {
          "type": 5,
          "content": {
            "type": 4,
            "isStatic": false,
            "isConstant": false,
            "content": "item.name",
            "loc": {
              "start": {
                "column": 58,
                "line": 1,
                "offset": 57
              },
              "end": {
                "column": 67,
                "line": 1,
                "offset": 66
              },
              "source": "item.name"
            }
          },
          "loc": {
            "start": {
              "column": 56,
              "line": 1,
              "offset": 55
            },
            "end": {
              "column": 69,
              "line": 1,
              "offset": 68
            },
            "source": "{{item.name}}"
          }
        }
      ],
      "loc": {
        "start": {
          "column": 1,
          "line": 1,
          "offset": 0
        },
        "end": {
          "column": 75,
          "line": 1,
          "offset": 74
        },
        "source": "<div v-if=\"item.isShow\" v-for=\"(item, index) in items\">{{item.name}}</div>"
      }
    }
  ],
  "helpers": [],
  "components": [],
  "directives": [],
  "hoists": [],
  "imports": [],
  "cached": 0,
  "temps": 0,
  "loc": {
    "start": {
      "column": 1,
      "line": 1,
      "offset": 0
    },
    "end": {
      "column": 75,
      "line": 1,
      "offset": 74
    },
    "source": "<div v-if=\"item.isShow\" v-for=\"(item, index) in items\">{{item.name}}</div>"
  }
}

baseParse 中调用了 5 个函数:

  • createParserContext
  • getCursor
  • createRoot
  • getSelection
  • parseChildren —— 核心处理逻辑
createParserContext

此函数创建了一个 context,用于关联上下文保存数据。

function createParserContext(
  content: string,
  options: ParserOptions
): ParserContext {
  return {
    options: {
      ...defaultParserOptions,
      ...options
    },
    column: 1,
    line: 1,
    offset: 0,
    originalSource: content,
    source: content,
    inPre: false,
    inVPre: false
  }
}
getCursor

Using cursors, one can search an AST for a selected node and replace, delete, update, or detach it. —— AST_Cursors

cursor 可以理解为对每个节点加了一个下标,此方法用于获取上下文中 cursor 的值。

cusor 由 column、line 以及 offset 组成。

function getCursor(context: ParserContext): Position {
  const { column, line, offset } = context
  return { column, line, offset }
}
createRoot

其含义是,创建 AST JSON 的根。

大家可以理解为每个 template 的根都是一样的。

参数为 childrenloc

export const locStub: SourceLocation = {
  source: '',
  start: { line: 1, column: 1, offset: 0 },
  end: { line: 1, column: 1, offset: 0 }
}

export function createRoot(
  children: TemplateChildNode[],
  loc = locStub
): RootNode {
  return {
    type: NodeTypes.ROOT,
    children,
    helpers: [],
    components: [],
    directives: [],
    hoists: [],
    imports: [],
    cached: 0,
    temps: 0,
    codegenNode: undefined,
    loc
  }
}

getSelection

function getSelection(
  context: ParserContext,
  start: Position,
  end?: Position
): SourceLocation {
  end = end || getCursor(context)
  return {
    start,
    end,
    source: context.originalSource.slice(start.offset, end.offset)
  }
}

parseChildren

此函数为核心处理逻辑。(最重要的放在最后)

大家在大学时,都学过树的遍历方式。

  • 深度优先遍历
  • 广度优先遍历

这里 AST 的本质就是一颗树,因此上述遍历方式均有效。

那如果将 template -> AST,会如何做?

比如,这个例子:

<div>
  <div>
    <span>示例</span>
  </div>
</div>

抛开自动闭合、注释、属性、指令及插值等特性,简化版的 AST 如下:

ps: 上述抛开的特性在源码中均有处理。

{
  type: 0,
  children: [
    {
      tag: 'div',
      children: [
        {
          tag: 'div',
          children: [
            {
              tag: 'span',
              children: [
                {
                  content: '示例'
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

对源码进行逐行处理,根据 <</ 来判断是节点开始,还是节点结束。

逐行解析。

vue-next 在解析时,处理了几种文本类型:

文本类型 适用
DATA 通用类型
RCDATA <textarea>
RAWTEXT <style>,<script>
CDATA 用于处理 XML 中的 <![CDATA[]]>
ATTRIBUTE_VALUE 属性

以注释代替代码:

function parseChildren(
  context: ParserContext,
  mode: TextModes,
  ancestors: ElementNode[]
): TemplateChildNode[] {
  // while 循环,判断是否结束,以模板最后的结束符为准
  while (!isEnd(context, mode, ancestors)) {
    // 处理插值
    // 处理注释
    // 处理 tag
    //   递归调用 parseChildren
    // 处理 element(自定义组件)
    //   递归调用 parseChildren
    // 处理所有属性
    //   处理指令
  }
}

参考资料

created time in 15 days

delete branch docschina/webpack.js.org

delete branch : cn-lizhihua

delete time in 15 days

push eventdocschina/webpack.js.org

lizhihua

commit sha 2dcdda4ad02eab0fc74577b71f051bdc1df8c467

docs: update guides (#711)

view details

push time in 15 days

PR merged docschina/webpack.js.org

docs: update guides
+389 -389

1 comment

10 changed files

dear-lizhihua

pr closed time in 15 days

Pull request review commentdocschina/webpack.js.org

update guides

 contributors:   - wizardofhogwarts --- -If you've been following the guides from the start, you will now have a small project that shows "Hello webpack". Now let's try to incorporate some other assets, like images, to see how they can be handled.+如果你是从开始一直遵循着指南的示例,现在会有一个小项目,显示 "Hello webpack"。现在我们尝试混合一些其他资源,比如 images,看看 webpack 如何处理。

dear-lizhihua

comment created time in 15 days

delete branch docschina/webpack.js.org

delete branch : lcxfs1991

delete time in 15 days

push eventdocschina/webpack.js.org

heyli

commit sha 5a1aa85d8f1ac9e29420dfba3c26d439e655df92

docs: add configuration (#712)

view details

push time in 15 days

PR merged docschina/webpack.js.org

docs: add configuration

describe your changes...

  • [ ] Read and sign the CLA. PRs that haven't signed it won't be accepted.
  • [ ] Make sure your PR complies with the writer's guide.
  • [ ] Review the diff carefully as sometimes this can reveal issues.
  • [ ] Do not abandon your Pull Request: Stale Pull Requests.
  • Remove these instructions from your PR as they are for your eyes only.
+285 -283

1 comment

8 changed files

lcxfs1991

pr closed time in 15 days

startedjonschlinkert/remarkable

started time in 18 days

fork QC-L/Recoil

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

fork in 18 days

push eventQC-L/awesome-react-hooks-cn

Tudor Gergely

commit sha 37d051a99b0148db0e6fed1bf9d358d6e21815b2

add tudorgergely/use-scroll-to-bottom (#197) React hook for detecting when an element was scrolled to bottom

view details

Alex Johansson

commit sha 11a4c568ebe3ad819e80cd18615062fe886a1ecc

Add `use-is-typing` (#199)

view details

Sandip Nirmal

commit sha 7d290869375a881dc988123dab5a2df78743a1a8

Added video link for custom hooks. (#198)

view details

Eugene Tiurin

commit sha 3ccdd7261901c36f7d5bd76ca450b793fe419e62

Add react-hook-layout (#200)

view details

Inter Caetera

commit sha 17f405571319a0a7a5d1fa6b5dccbbaac9257f9e

Add react-use-message-bar (#201)

view details

Welly

commit sha d10005375c72685e889ca9891bc68e981dd47f12

Add react-cool-inview hook (#203)

view details

Mattia Richetto

commit sha 6412af0c2887cd0ab705275c999ed55f1264fd62

use-reducer-with-local-storage (#205)

view details

Rob Calcroft

commit sha d2367690c74a6282cb46d1afd520f390e9a4b8ed

Add react-use-infinite-loader (#204)

view details

Pranesh

commit sha 78d8ca64aecf5f966e4f9a4f38d1a9045fc1d98e

Add useKeyCapture (#202)

view details

Wenzel Lowe

commit sha b4b9463bc0a455aa80d2379034d397e64f497991

Add use-autocomplete (#206)

view details

David Conner

commit sha 74c42ad0f70a9f48abbd3d2b038e8ce56563c8cf

Add use-lang-direction hook to readme (#208)

view details

QC-L

commit sha ca39470ca845519e00931fdc70635b8d6c6b641d

docs(cn): fix conflict

view details

push time in 19 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha e67d5b14353b0f231fdd787c9010f7a78e5fc1fc

deploy pages [ci skip]

view details

push time in 21 days

delete branch reactjs/zh-hans.reactjs.org

delete branch : sync-bc91fe41

delete time in 21 days

push eventreactjs/zh-hans.reactjs.org

Dan Abramov

commit sha 77d3c2fa8e7f8bd26336b652d21336b3d13f682d

Move Nicolas to team alumni (#2948)

view details

Farjad Fazli

commit sha 0075e554ddac319d9c3d7848c05c7ea39dc534da

Corrected typo/grammar issue (#2943)

view details

Vlad Denisov

commit sha 1c71049cfb42588e0f30c87acfe55f95fdb286f5

Update Footer link href (#2950)

view details

Arif Zuhairi

commit sha bc91fe4101420f98454a59ac34c1cf1d4d4f4476

Update cdn-links.html (#2957) link to next article is wrong. It should be release-channels.html, not hello-world.html

view details

reactjs-translation-bot

commit sha 1d34d751aa1c1ba3af01193c4066dd529a156919

merging all conflicts

view details

Yuqing Chen

commit sha 995f507bc8bded2e1c9b6f09ba3e04de9612c4a6

doc: resolve conflicts in tutorial/tutorial.md

view details

QiChang Li

commit sha cada141ffe32276afdbdef54bf6cc745b966cd85

docs(cn): merge reactjs.org into zh-hans @ bc91fe41

view details

push time in 21 days

PR merged reactjs/zh-hans.reactjs.org

Reviewers
docs(cn): merge reactjs.org into zh-hans @ bc91fe41

This PR was automatically generated.

Merge changes from reactjs.org at bc91fe41

The following files have conflicts and may need new translations:

Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch.

DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will "erase" the commits from master and cause them to show up as conflicts the next time we merge.

+3 -10

1 comment

3 changed files

reactjs-translation-bot

pr closed time in 21 days

push eventQC-L/vue-next

Evan You

commit sha 957d3a0547e43ecf81169f5dd9663cf754ea7167

refactor: portal should not expect ref target

view details

Evan You

commit sha dfc7c0f12ad032753005602f4e35259cdb402e73

refactor: adjust internal vnode types + more dts tests

view details

Evan You

commit sha 28a1e8ab27523baebd5df55e7a49c332a847017d

chore: ignore test utils in coverage

view details

dependabot-preview[bot]

commit sha 7019e7349c79478bfd87ca02f8d3879121a119e7

build(deps-dev): bump rollup from 1.26.0 to 1.26.3 Bumps [rollup](https://github.com/rollup/rollup) from 1.26.0 to 1.26.3. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v1.26.0...v1.26.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

dependabot-preview[bot]

commit sha a5f1387d785fa791c9faac5606e5ca46d8ec0b8c

build(deps-dev): bump @microsoft/api-extractor from 7.5.2 to 7.5.4 Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.5.2 to 7.5.4. - [Release notes](https://github.com/microsoft/rushstack/releases) - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor-model_v7.5.2...@microsoft/api-extractor-model_v7.5.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

Evan You

commit sha 98e9b769e6528a303b06f7e52a9544b3d057f0a6

feat(compiler): support keep-alive in templates

view details

Junyan

commit sha a02820d7e046d32f635f04104472fc9f823e9d49

feat: warn when toRefs() receives non-reactive object (#430)

view details

Chester

commit sha 2d5f9b58acbe62815735a1c9c4019ed8a004803e

refactor: skip destructuring when use with (#425)

view details

Evan You

commit sha c61e5463fa77a56c4271db958e4a8e48bb2ae233

feat: warn duplicate plugin installations

view details

Evan You

commit sha 645f13c36d03ea759a48639c8852ec055c4d6b15

build(deps-dev): bump TS to 3.7

view details

dependabot-preview[bot]

commit sha 9e03b6896db95b9e663db8e199a8d7958a270f64

build(deps-dev): bump @types/jest from 24.0.21 to 24.0.22 Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.0.21 to 24.0.22. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

Evan You

commit sha e79c918676a0703be868efce0115bc1037e84f40

feat(inject): allow usage in functional components

view details

Evan You

commit sha d9c6ff372c10dde8b496ee32f2b9a246edf66a35

feat(core): allow passing explicit refs via props

view details

Evan You

commit sha acbbe3298c72c8058c31f160f6900fc0c7542a00

refactor: move codeframe to @vue/shared

view details

Evan You

commit sha d7eab51315bc994f7f9e3ba8e22a4ad31d3facca

refactor: move dom tag config to shared Otherwise runtime-dom cjs & esm builds will import compiler-dom

view details

Evan You

commit sha 3ec63dbee17d14e4cff23d954de623ead3e47a29

build: only remove dist directory when building all formats

view details

Evan You

commit sha f8e7fadaae8177a02f8abd7568d9fb6fbc96f7ee

build: disable live external bindings for cjs build

view details

Evan You

commit sha 4b739e3bc09e4693a5c356ee432520a1c507731e

fix(compiler-core): should not condense whitespace in RAWTEXT mode

view details

Evan You

commit sha 7031e6a07a4d87bbeccea06e40de011a9fa623ed

feat: (wip) setup compiler-sfc

view details

Evan You

commit sha 68f28c2667f72ce4feafc0d3fa2f4302dd2439c4

refactor: rename files

view details

push time in 22 days

push eventdocschina/webpack.js.org

韶羽韵

commit sha 5c74bfb72352d97e0e477a779ceb66c6fc989494

docs(cn): fix wepback -> webpack in src/content/concepts/plugins.md (#713)

view details

push time in 22 days

pull request commentdocschina/webpack.js.org

Update plugins.md

3Q

shaoyuyun

comment created time in 22 days

push eventreactjs/zh-hans.reactjs.org

QC-L

commit sha d5329058a2903a2e62051c32ef888d446757f07a

deploy pages [ci skip]

view details

push time in 22 days

push eventreactjs/zh-hans.reactjs.org

Yunhao Zhang

commit sha f1acc4e408b603bb01a6338f858c5b2d69c40cc7

docs(cn): fix typo (#400)

view details

push time in 22 days

PR merged reactjs/zh-hans.reactjs.org

docs(cn): fix typo

<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->

+1 -1

2 comments

1 changed file

cnwangjie

pr closed time in 22 days

pull request commentreactjs/zh-hans.reactjs.org

docs(cn): fix typo

3Q

cnwangjie

comment created time in 22 days

MemberEvent

Pull request review commentdocschina/webpack.js.org

add configuration

 module.exports = { }; ``` -This leaves any dependent modules unchanged, i.e. the code shown below will still work:+这样就剥离了那些不需要改动的依赖模块,换句话,下面展示的代码还可以正常运行:  ```javascript import $ from 'jquery';  $('.my-element').animate(/* ... */); ``` -The bundle with external dependencies can be used in various module contexts, such as [CommonJS, AMD, global and ES2015 modules](/concepts/modules). The external library may be available in any of these forms:+具有外部依赖(external dependency)的 bundle 可以在各种模块上下文(module context)中使用,例如 [CommonJS, AMD, 全局变量和 ES2015 模块](/concepts/modules)。外部 library 可能是以下任何一种形式: -- __root__: The library should be available as a global variable (e.g. via a script tag).-- __commonjs__: The library should be available as a CommonJS module.-- __commonjs2__: Similar to the above but where the export is `module.exports.default`.-- __amd__: Similar to `commonjs` but using AMD module system.+- __root__:可以通过一个全局变量访问 library(例如,通过 script 标签)。+- __commonjs__:可以将 library 作为一个 CommonJS 模块访问。+- __commonjs2__:和上面的类似,但导出的是 `module.exports.default`.+- __amd__:类似于 `commonjs`,但使用 AMD 模块系统。 -The following syntaxes are accepted...+可以接受以下语法…… 

多删了一行,不对齐了,我们还是遵循原文吧?

lcxfs1991

comment created time in 22 days

Pull request review commentdocschina/webpack.js.org

[wip] update guides

 contributors:   - wizardofhogwarts --- -If you've been following the guides from the start, you will now have a small project that shows "Hello webpack". Now let's try to incorporate some other assets, like images, to see how they can be handled.+如果你是从开始一直遵循着指南的示例,现在会有一个小项目,显示 "Hello webpack"。现在我们尝试混合一些其他资源,比如 images,看看 webpack 如何处理。

遵循读着很奇怪,稍微改了下。

dear-lizhihua

comment created time in 22 days

Pull request review commentdocschina/webpack.js.org

[wip] update guides

 contributors:   - wizardofhogwarts --- -If you've been following the guides from the start, you will now have a small project that shows "Hello webpack". Now let's try to incorporate some other assets, like images, to see how they can be handled.+如果你是从开始一直遵循着指南的示例,现在会有一个小项目,显示 "Hello webpack"。现在我们尝试混合一些其他资源,比如 images,看看 webpack 如何处理。
如果你从开始就一直学习本指南中的示例,现在应该会有一个小项目,显示 "Hello webpack"。现在我们尝试混合一些其他资源,比如 images,看看 webpack 如何处理。
dear-lizhihua

comment created time in 22 days

issue commentdocschina/docschina.org

没看到gatsbyjs的介绍?

729902288

comment created time in 24 days

more