mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 11:52:00 +00:00
Fix typoError Mentioned in issue (#6400)
This commit is contained in:
@@ -58,13 +58,13 @@ export interface RouteMeta {
|
||||
order?: number;
|
||||
}
|
||||
|
||||
type TravesalContext = RouteMeta & {
|
||||
type TraversalContext = RouteMeta & {
|
||||
currentIndex: number;
|
||||
};
|
||||
|
||||
export function getRouteMeta(cleanedPath: string, routeTree: RouteItem) {
|
||||
const breadcrumbs = getBreadcrumbs(cleanedPath, routeTree);
|
||||
const ctx: TravesalContext = {
|
||||
const ctx: TraversalContext = {
|
||||
currentIndex: 0,
|
||||
};
|
||||
buildRouteMeta(cleanedPath, routeTree, ctx);
|
||||
@@ -79,7 +79,7 @@ export function getRouteMeta(cleanedPath: string, routeTree: RouteItem) {
|
||||
function buildRouteMeta(
|
||||
searchPath: string,
|
||||
currentRoute: RouteItem,
|
||||
ctx: TravesalContext
|
||||
ctx: TraversalContext
|
||||
) {
|
||||
ctx.currentIndex++;
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ Making plain JavaScript in React components reactive requires a compiler with a
|
||||
|
||||
## Offscreen Rendering {/*offscreen-rendering*/}
|
||||
|
||||
Offscreen rendering is an upcoming capability in React for rendering screens in the background without additional performance overhead. You can think of it as a version of the [`content-visiblity` CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/content-visibility) that works not only for DOM elements but React components, too. During our research, we've discovered a variety of use cases:
|
||||
Offscreen rendering is an upcoming capability in React for rendering screens in the background without additional performance overhead. You can think of it as a version of the [`content-visibility` CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/content-visibility) that works not only for DOM elements but React components, too. During our research, we've discovered a variety of use cases:
|
||||
|
||||
- A router can prerender screens in the background so that when a user navigates to them, they're instantly available.
|
||||
- A tab switching component can preserve the state of hidden tabs, so the user can switch between them without losing their progress.
|
||||
|
||||
@@ -985,7 +985,7 @@ export const places = [{
|
||||
}, {
|
||||
id: 5,
|
||||
name: 'Chefchaouen, Marocco',
|
||||
description: 'There are a few theories on why the houses are painted blue, including that the color repells mosquitos or that it symbolizes sky and heaven.',
|
||||
description: 'There are a few theories on why the houses are painted blue, including that the color repels mosquitos or that it symbolizes sky and heaven.',
|
||||
imageId: 'rTqKo46'
|
||||
}, {
|
||||
id: 6,
|
||||
@@ -1124,7 +1124,7 @@ export const places = [{
|
||||
}, {
|
||||
id: 5,
|
||||
name: 'Chefchaouen, Marocco',
|
||||
description: 'There are a few theories on why the houses are painted blue, including that the color repells mosquitos or that it symbolizes sky and heaven.',
|
||||
description: 'There are a few theories on why the houses are painted blue, including that the color repels mosquitos or that it symbolizes sky and heaven.',
|
||||
imageId: 'rTqKo46'
|
||||
}, {
|
||||
id: 6,
|
||||
|
||||
@@ -273,7 +273,7 @@ export async function deliverMessage(message) {
|
||||
|
||||
</Sandpack>
|
||||
|
||||
[//]: # 'Uncomment the next line, and delete this line after the `useOptimisitc` reference documentatino page is published'
|
||||
[//]: # 'Uncomment the next line, and delete this line after the `useOptimistic` reference documentatino page is published'
|
||||
[//]: # 'To learn more about the `useOptimistic` Hook see the [reference documentation](/reference/react/hooks/useOptimistic).'
|
||||
|
||||
### Handling form submission errors {/*handling-form-submission-errors*/}
|
||||
|
||||
@@ -309,7 +309,7 @@ async function DemoProfile() {
|
||||
|
||||
React only provides cache access to the memoized function in a component. When calling <CodeStep step={1}>`getUser`</CodeStep> outside of a component, it will still evaluate the function but not read or update the cache.
|
||||
|
||||
This is because cache access is provided through a [context](/learn/passing-data-deeply-with-context) which is only accessibile from a component.
|
||||
This is because cache access is provided through a [context](/learn/passing-data-deeply-with-context) which is only accessible from a component.
|
||||
|
||||
</Pitfall>
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ In this example, the constant `password` is tainted. Then `password` is used to
|
||||
|
||||
Other similar ways of deriving new values from tainted values like concatenating it into a larger string, converting it to base64, or returning a substring create untained values.
|
||||
|
||||
Tainting only protects against simple mistakes like explictly passing secret values to the client. Mistakes in calling the `taintUniqueValue` like using a global store outside of React, without the corresponding lifetime object, can cause the tainted value to become untainted. Tainting is a layer of protection; a secure app will have multiple layers of protection, well designed APIs, and isolation patterns.
|
||||
Tainting only protects against simple mistakes like explicitly passing secret values to the client. Mistakes in calling the `taintUniqueValue` like using a global store outside of React, without the corresponding lifetime object, can cause the tainted value to become untainted. Tainting is a layer of protection; a secure app will have multiple layers of protection, well designed APIs, and isolation patterns.
|
||||
|
||||
</Pitfall>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user