Skip to content

Commit 12d672b

Browse files
authored
fix conflict
1 parent fd955ea commit 12d672b

File tree

6 files changed

+1
-90
lines changed

6 files changed

+1
-90
lines changed

src/content/learn/add-react-to-an-existing-project.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ title: اضافه کردن ری‌اکت به یک پروژه موجود
2424
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/)).
2525
3. **سرور یا پروکسی خود را پیکربندی کنید** تا همه درخواست‌های زیر مسیر `/some-app/` توسط اپلیکیشن ری‌اکت شما مدیریت شوند.
2626

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-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
27+
این کار تضمین می‌کند که بخش ری‌اکت اپلیکیشن شما می‌تواند از [بهترین شیوه‌های موجود](/learn/build-a-react-app-from-scratch#consider-using-a-framework) که در این فریم‌ورک‌ها تعبیه شده‌اند بهره‌مند شود.
3228

3329
بسیاری از فریم‌ورک‌های مبتنی بر ری‌اکت فول‌استک هستند و به اپلیکیشن ری‌اکت شما اجازه می‌دهند از قابلیت‌های سرور استفاده کند. با این حال، حتی اگر نتوانید یا نخواهید جاوااسکریپت را روی سرور اجرا کنید، می‌توانید از همان رویکرد استفاده کنید. در این حالت، خروجی HTML/CSS/JS را (خروجی [`next export`](https://nextjs.org/docs/advanced-features/static-html-export) در Next.js یا حالت پیش‌فرض در Gatsby) در مسیر `/some-app/` سرو کنید.
3430

src/content/learn/react-compiler/installation.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -176,20 +176,7 @@ Install the ESLint plugin:
176176
npm install -D eslint-plugin-react-hooks@rc
177177
</TerminalBlock>
178178

179-
<<<<<<< HEAD
180-
Then enable the compiler rule in your ESLint configuration:
181-
182-
```js {3}
183-
// .eslintrc.js
184-
module.exports = {
185-
rules: {
186-
'react-hooks/react-compiler': 'error',
187-
},
188-
};
189-
```
190-
=======
191179
If you haven't already configured eslint-plugin-react-hooks, follow the [installation instructions in the readme](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/README.md#installation). The compiler rule is enabled by default in the latest RC, so no additional configuration is needed.
192-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
193180

194181
The ESLint rule will:
195182
- Identify violations of the [Rules of React](/reference/rules)

src/content/learn/react-compiler/introduction.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,7 @@ Next.js users can enable the swc-invoked React Compiler by using [v15.3.1](https
154154

155155
## What should I do about useMemo, useCallback, and React.memo? {/*what-should-i-do-about-usememo-usecallback-and-reactmemo*/}
156156

157-
<<<<<<< HEAD
158-
If you are using React Compiler, [`useMemo`](/reference/react/useMemo), [`useCallback`](/reference/react/useCallback), and [`React.memo`](/reference/react/memo) can be removed. React Compiler adds automatic memoization more precisely and granularly than is possible with these hooks. If you choose to keep manual memoization, React Compiler will analyze them and determine if your manual memoization matches its automatically inferred memoization. If there isn't a match, the compiler will choose to bail out of optimizing that component.
159-
=======
160157
React Compiler adds automatic memoization more precisely and granularly than is possible with [`useMemo`](/reference/react/useMemo), [`useCallback`](/reference/react/useCallback), and [`React.memo`](/reference/react/memo). If you choose to keep manual memoization, React Compiler will analyze them and determine if your manual memoization matches its automatically inferred memoization. If there isn't a match, the compiler will choose to bail out of optimizing that component.
161-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
162158

163159
This is done out of caution as a common anti-pattern with manual memoization is using it for correctness. This means your app depends on specific values being memoized to work properly. For example, in order to prevent an infinite loop, you may have memoized some values to stop a `useEffect` call from firing. This breaks the Rules of React, but since it can potentially be dangerous for the compiler to automatically remove manual memoization, the compiler will just bail out instead. You should manually remove your handwritten memoization and verify that your app still works as expected.
164160

src/content/reference/react/Activity.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ While hidden, children still re-render in response to new props, albeit at a low
5151

5252
When the boundary becomes <CodeStep step={3}>visible</CodeStep> again, React will reveal the children with their previous state restored, and re-create their Effects.
5353

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-
=======
5754
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-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
5955

6056
[See more examples below.](#usage)
6157

@@ -66,23 +62,15 @@ In this way, Activity can be thought of as a mechanism for rendering "background
6662

6763
#### Caveats {/*caveats*/}
6864

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-
=======
7265
- 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-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
7466

7567
---
7668

7769
## Usage {/*usage*/}
7870

7971
### Restoring the state of hidden components {/*restoring-the-state-of-hidden-components*/}
8072

81-
<<<<<<< HEAD
82-
Typically in React, when you want to conditionally show or hide a component, you mount and unmount it:
83-
=======
8473
In React, when you want to conditionally show or hide a component, you typically mount or unmount it based on that condition:
85-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
8674

8775
```jsx
8876
{isShowingSidebar && (
@@ -100,19 +88,12 @@ When you hide a component using an Activity boundary instead, React will "save"
10088
</Activity>
10189
```
10290

103-
<<<<<<< HEAD
104-
This makes it possible to restore components to their previous state.
10591

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-
=======
11092
This makes it possible to hide and then later restore components in the state they were previously in.
11193

11294
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.
11395

11496
Try expanding the Overview section, and then toggling the sidebar closed then open:
115-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
11697

11798
<Sandpack>
11899

src/sidebarHome.json

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,8 @@
1515
"path": "/learn/installation"
1616
},
1717
{
18-
<<<<<<< HEAD
1918
"title": "کامپایلر ری‌اکت",
2019
"path": "/learn/react-compiler"
21-
=======
22-
"title": "React Compiler",
23-
"path": "/learn/react-compiler"
24-
},
25-
{
26-
"hasSectionHeader": true,
27-
"sectionHeader": "LEARN REACT"
28-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
2920
},
3021
{
3122
"hasSectionHeader": true,
@@ -89,27 +80,7 @@
8980
},
9081
{
9182
"hasSectionHeader": true,
92-
<<<<<<< HEAD
9383
"sectionHeader": "API کامپایلر ری‌اکت"
94-
=======
95-
"sectionHeader": "REACT COMPILER API"
96-
},
97-
{
98-
"title": "Configuration",
99-
"path": "/reference/react-compiler/configuration"
100-
},
101-
{
102-
"title": "Directives",
103-
"path": "/reference/react-compiler/directives"
104-
},
105-
{
106-
"title": "Compiling Libraries",
107-
"path": "/reference/react-compiler/compiling-libraries"
108-
},
109-
{
110-
"hasSectionHeader": true,
111-
"sectionHeader": "GET INVOLVED"
112-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
11384
},
11485
{
11586
"title": "پیکربندی",

src/sidebarLearn.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,11 @@
5757
]
5858
},
5959
{
60-
<<<<<<< HEAD
6160
"title": "کامپایلر ری‌اکت",
62-
=======
63-
"title": "React Compiler",
64-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
6561
"path": "/learn/react-compiler",
6662
"canary": true,
6763
"routes": [
6864
{
69-
<<<<<<< HEAD
7065
"title": "مقدمه",
7166
"path": "/learn/react-compiler/introduction"
7267
},
@@ -80,21 +75,6 @@
8075
},
8176
{
8277
"title": "دیباگ و رفع اشکال",
83-
=======
84-
"title": "Introduction",
85-
"path": "/learn/react-compiler/introduction"
86-
},
87-
{
88-
"title": "Installation",
89-
"path": "/learn/react-compiler/installation"
90-
},
91-
{
92-
"title": "Incremental Adoption",
93-
"path": "/learn/react-compiler/incremental-adoption"
94-
},
95-
{
96-
"title": "Debugging and Troubleshooting",
97-
>>>>>>> 2774ddfa0c39b8c2f0563b987dcb90a01ee723cf
9878
"path": "/learn/react-compiler/debugging"
9979
}
10080
]

0 commit comments

Comments
 (0)