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/javascript-in-jsx-with-curly-braces.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,12 +110,12 @@ export default function TodoList() {
110
110
111
111
</Sandpack>
112
112
113
-
### Where to use curly braces {/*where-to-use-curly-braces*/}
113
+
### أين يجب استخدام الأقواس المعقوفة؟ {/*where-to-use-curly-braces*/}
114
114
115
-
You can only use curly braces in two ways inside JSX:
115
+
يمكنك استخدام الأقواس المعقوفة في JSX بطريقتين فقط:
116
116
117
-
1. **As text** directly inside a JSX tag: `<h1>{name}'s To Do List</h1>`works, but`<{tag}>Gregorio Y. Zara's To Do List</{tag}>` will not.
118
-
2. **As attributes** immediately following the `=` sign: `src={avatar}` will read the `avatar` variable, but `src="{avatar}"` will pass the string `"{avatar}"`.
117
+
1. **كنص** مباشرة داخل وسم JSX: `<h1>{name}'s قائمة المهام</h1>`يعمل، ولكن`<{tag}>قائمة المهام لـ Gregorio Y. Zara</{tag}>`لن يعمل.
118
+
2. **كخصائص** تأتي فورًا بعد علامة `=`: `src={avatar}`ستقرأ قيمة المتغير`avatar`، ولكن `src="{avatar}"`ستمرر `"{avatar}"` في صورة string.
119
119
120
120
## Using "double curlies": CSS and other objects in JSX {/*using-double-curlies-css-and-other-objects-in-jsx*/}
0 commit comments