You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/learn/add-react-to-an-existing-project.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,7 @@ title: اضافه کردن ریاکت به یک پروژه موجود
24
24
2.**`/some-app` را بهعنوان *مسیر پایه*** در پیکربندی فریمورک خود مشخص کنید (راهنما: [Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)، [Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)).
25
25
3.**سرور یا پروکسی خود را پیکربندی کنید** تا همه درخواستهای زیر مسیر `/some-app/` توسط اپلیکیشن ریاکت شما مدیریت شوند.
26
26
27
-
<<<<<<< HEAD
28
-
این کار تضمین میکند که بخش ریاکت اپلیکیشن شما میتواند از [بهترین شیوههای موجود](/learn/build-a-react-app-from-scratch#consider-using-a-framework) که در این فریمورکها تعبیه شدهاند بهرهمند شود.
29
-
=======
30
-
This ensures the React part of your app can [benefit from the best practices](/learn/build-a-react-app-from-scratch#consider-using-a-framework) baked into those frameworks.
31
-
>>>>>>> 27d86ffe6ec82e3642c6490d2187bae2271020a4
27
+
این کار تضمین میکند که بخش ریاکتِ اپلیکیشن شما میتواند از [بهترین شیوهها](/learn/build-a-react-app-from-scratch#consider-using-a-framework) تعبیهشده در آن فریمورکها بهرهمند شود.
32
28
33
29
بسیاری از فریمورکهای مبتنی بر ریاکت فولاستک هستند و به اپلیکیشن ریاکت شما اجازه میدهند از قابلیتهای سرور استفاده کند. با این حال، حتی اگر نتوانید یا نخواهید جاوااسکریپت را روی سرور اجرا کنید، میتوانید از همان رویکرد استفاده کنید. در این حالت، خروجی HTML/CSS/JS را (خروجی [`next export`](https://nextjs.org/docs/advanced-features/static-html-export) در Next.js یا حالت پیشفرض در Gatsby) در مسیر `/some-app/` سرو کنید.
Copy file name to clipboardExpand all lines: src/content/reference/react/Activity.md
-19Lines changed: 0 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,7 @@ While hidden, children still re-render in response to new props, albeit at a low
51
51
52
52
When the boundary becomes <CodeStepstep={3}>visible</CodeStep> again, React will reveal the children with their previous state restored, and re-create their Effects.
53
53
54
-
<<<<<<< HEAD
55
-
In this way, Activity can thought of as a mechanism for rendering "background activity". Rather than completely discarding content that's likely to become visible again, you can use Activity to maintain and restore that content's UI and internal state, while ensuring hidden content has no unwanted side effects.
56
-
=======
57
54
In this way, Activity can be thought of as a mechanism for rendering "background activity". Rather than completely discarding content that's likely to become visible again, you can use Activity to maintain and restore that content's UI and internal state, while ensuring that your hidden content has no unwanted side effects.
58
-
>>>>>>> 27d86ffe6ec82e3642c6490d2187bae2271020a4
59
55
60
56
[See more examples below.](#usage)
61
57
@@ -66,23 +62,15 @@ In this way, Activity can be thought of as a mechanism for rendering "background
66
62
67
63
#### Caveats {/*caveats*/}
68
64
69
-
<<<<<<< HEAD
70
-
- When used with `<ViewTransition>`, hidden activities that reveal in a transition will activate an "enter" animation. Visible Activities hidden in a transition will activate an "exit" animation.
71
-
=======
72
65
- If an Activity is rendered inside of a [ViewTransition](/reference/react/ViewTransition), and it becomes visible as a result of an update caused by [startTransition](/reference/react/startTransition), it will activate the ViewTransition's `enter` animation. If it becomes hidden, it will activate its `exit` animation.
73
-
>>>>>>> 27d86ffe6ec82e3642c6490d2187bae2271020a4
74
66
75
67
---
76
68
77
69
## Usage {/*usage*/}
78
70
79
71
### Restoring the state of hidden components {/*restoring-the-state-of-hidden-components*/}
80
72
81
-
<<<<<<< HEAD
82
-
Typically in React, when you want to conditionally show or hide a component, you mount and unmount it:
83
-
=======
84
73
In React, when you want to conditionally show or hide a component, you typically mount or unmount it based on that condition:
85
-
>>>>>>> 27d86ffe6ec82e3642c6490d2187bae2271020a4
86
74
87
75
```jsx
88
76
{isShowingSidebar && (
@@ -100,19 +88,12 @@ When you hide a component using an Activity boundary instead, React will "save"
100
88
</Activity>
101
89
```
102
90
103
-
<<<<<<< HEAD
104
-
This makes it possible to restore components to their previous state.
105
91
106
-
The following example has a sidebar with an expandable section – you can press "Overview" to reveal the three subitems below it. The main app area also has a button that hides and shows the sidebar.
107
-
108
-
Try expanding the Overview section, then toggling the sidebar closed and open:
109
-
=======
110
92
This makes it possible to hide and then later restore components in the state they were previously in.
111
93
112
94
The following example has a sidebar with an expandable section. You can press "Overview" to reveal the three subitems below it. The main app area also has a button that hides and shows the sidebar.
113
95
114
96
Try expanding the Overview section, and then toggling the sidebar closed then open:
0 commit comments