From f67fa22cc1faee261f9e22449d90323e26174e8e Mon Sep 17 00:00:00 2001 From: Akul Srivastava Date: Sat, 9 Jul 2022 17:39:37 +0530 Subject: [PATCH] fix: api links in content (#4806) * fix: api reference links in content * fix: link on react dom api page --- beta/src/pages/apis/index.md | 2 +- beta/src/pages/apis/reactdom.md | 2 +- beta/src/pages/apis/usecontext.md | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/beta/src/pages/apis/index.md b/beta/src/pages/apis/index.md index 4fdbecd8a..254ee491b 100644 --- a/beta/src/pages/apis/index.md +++ b/beta/src/pages/apis/index.md @@ -30,7 +30,7 @@ import * as React from 'react'; -If you use React on the web, you'll also need the same version of [ReactDOM](/api/reactdom). +If you use React on the web, you'll also need the same version of [ReactDOM](/apis/reactdom). ## Exports {/*exports*/} diff --git a/beta/src/pages/apis/reactdom.md b/beta/src/pages/apis/reactdom.md index 229cb369d..a30307272 100644 --- a/beta/src/pages/apis/reactdom.md +++ b/beta/src/pages/apis/reactdom.md @@ -30,7 +30,7 @@ import * as ReactDOMClient from 'react-dom/client'; -You'll also need to install the same version of [React](/api/). +You'll also need to install the same version of [React](/apis/). ## Browser Support {/*browser-support*/} diff --git a/beta/src/pages/apis/usecontext.md b/beta/src/pages/apis/usecontext.md index d03ebe120..58e33d708 100644 --- a/beta/src/pages/apis/usecontext.md +++ b/beta/src/pages/apis/usecontext.md @@ -927,7 +927,7 @@ ul, li { margin: 0; padding: 0; } ### Specifying a fallback default value {/*specifying-a-fallback-default-value*/} -If React can't find any providers of that particular context in the parent tree, the context value returned by `useContext()` will be equal to the default value that you specified when you [created that context](/api/createcontext): +If React can't find any providers of that particular context in the parent tree, the context value returned by `useContext()` will be equal to the default value that you specified when you [created that context](/apis/createcontext): ```js [[1, 1, "ThemeContext"], [3, 1, "null"]] const ThemeContext = createContext(null); @@ -1337,11 +1337,11 @@ function MyComponent() { #### Parameters {/*parameters*/} -* `SomeContext`: The context that you've previously created with [`createContext`](/api/createcontext). The context itself does not hold the information, it only represents the kind of information you can provide or read from components. +* `SomeContext`: The context that you've previously created with [`createContext`](/apis/createcontext). The context itself does not hold the information, it only represents the kind of information you can provide or read from components. #### Returns {/*returns*/} -`useContext` returns the context value for the calling component. It is determined as the `value` passed to the closest `SomeContext.Provider` above the calling component in the tree. If there is no such provider, then the returned value will be the `defaultValue` you have passed to [`createContext`](/api/createcontext) for that context. The returned value is always up-to-date. React automatically re-renders components that read some context if it changes. +`useContext` returns the context value for the calling component. It is determined as the `value` passed to the closest `SomeContext.Provider` above the calling component in the tree. If there is no such provider, then the returned value will be the `defaultValue` you have passed to [`createContext`](/apis/createcontext) for that context. The returned value is always up-to-date. React automatically re-renders components that read some context if it changes. #### Caveats {/*caveats*/}