From 65619013c255b2a8ba61929dee9662a95780e25b Mon Sep 17 00:00:00 2001 From: YuJian Date: Tue, 29 Mar 2022 15:39:34 +0800 Subject: [PATCH] vault backup: 2022-03-29 15:39:34 --- .obsidian/workspace | 6 +++--- 随时随地/简单的 React 思考 - Context.md | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.obsidian/workspace b/.obsidian/workspace index 9f59b12..7f881d0 100644 --- a/.obsidian/workspace +++ b/.obsidian/workspace @@ -9,7 +9,7 @@ "state": { "type": "markdown", "state": { - "file": "随时随地/简单的 React 思考 - Context.md", + "file": "随时随地/简单的 React 思考 - Fiber 创建.md", "mode": "source", "source": false } @@ -69,7 +69,7 @@ "state": { "type": "backlink", "state": { - "file": "随时随地/简单的 React 思考 - Context.md", + "file": "随时随地/简单的 React 思考 - Fiber 创建.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -89,10 +89,10 @@ }, "active": "1508f46ea2481b37", "lastOpenFiles": [ + "随时随地/简单的 React 思考 - Fiber 创建.md", "随时随地/简单的 React 思考 - Context.md", "基于 React Hook 开发的 Jira 系统/React 状态管理工具的简单思考.md", "随时随地/简单的 React 思考 - Hook.md", - "随时随地/简单的 React 思考 - Fiber 创建.md", "随时随地/React Hooks 的碎片记录.md", "随时随地/useEffect 和 Debounce.md", "随时随地/奇怪的疑惑.md", diff --git a/随时随地/简单的 React 思考 - Context.md b/随时随地/简单的 React 思考 - Context.md index f5f38bf..59c3209 100644 --- a/随时随地/简单的 React 思考 - Context.md +++ b/随时随地/简单的 React 思考 - Context.md @@ -3,3 +3,8 @@ 这里主要是对 Context API 的简单记录 ### React.createContext +```javascript +const MyContext = React.createContext(default) +``` + +createContext 会创建一个 \ No newline at end of file