diff --git a/content/docs/jsx-in-depth.md b/content/docs/jsx-in-depth.md index eb3dc3a5b..d2b229449 100644 --- a/content/docs/jsx-in-depth.md +++ b/content/docs/jsx-in-depth.md @@ -1,6 +1,6 @@ --- id: jsx-in-depth -title: JSX In Depth +title: Dərindən JSX permalink: docs/jsx-in-depth.html redirect_from: - "docs/jsx-spread.html" @@ -13,31 +13,31 @@ redirect_from: - "docs/jsx-in-depth-ko-KR.html" --- -Fundamentally, JSX just provides syntactic sugar for the `React.createElement(component, props, ...children)` function. The JSX code: +Fundamental olaraq JSX, `React.createElement(component, props, ...children)` funksiyası üçün asan başa düşülə bilən sintaksisdir. Göstərilən JSX kodu: ```js - Click Me + Tıkla ``` -compiles into: +aşağıdakı koda kompilyasiya olunur: ```js React.createElement( MyButton, {color: 'blue', shadowSize: 2}, - 'Click Me' + 'Tıkla' ) ``` -You can also use the self-closing form of the tag if there are no children. So: +Əgər uşaqlar yoxdursa, təqin özü bağlanan formasından istifadə etmək mümkündür. Göstərilən kod: ```js
``` -compiles into: +aşağıdakı koda kompilyasiya olunur: ```js React.createElement( @@ -47,19 +47,19 @@ React.createElement( ) ``` -If you want to test out how some specific JSX is converted into JavaScript, you can try out [the online Babel compiler](babel://jsx-simple-example). +Hər hansı bir JSX-in JavaScript-ə necə çevrildiyini yoxlamaq üçün [onlayn Babel kompilyatorundan](babel://jsx-simple-example) istifadə edə bilərsiniz. -## Specifying The React Element Type {#specifying-the-react-element-type} +## React Element Tipinin Müəyyənləşdirilməsi {#specifying-the-react-element-type} -The first part of a JSX tag determines the type of the React element. +JSX təqinin ilk hissəsi React elementinin tipini təyin edir. -Capitalized types indicate that the JSX tag is referring to a React component. These tags get compiled into a direct reference to the named variable, so if you use the JSX `` expression, `Foo` must be in scope. +Böyük hərf ilə yazılan tiplər JSX təqinin React komponentinə istinad etdiyini göstərir. Bu təqlər dəyişənin adından istifadə edərək kompilyasiya olunur. Bu səbəbdən `` JSX ifadəsindən istifadə etdikdə `Foo` dəyişəni göstərilən scope-da olmalıdır. -### React Must Be in Scope {#react-must-be-in-scope} +### React Scope-da Olmalıdır {#react-must-be-in-scope} -Since JSX compiles into calls to `React.createElement`, the `React` library must also always be in scope from your JSX code. +JSX kodu `React.createElement` çağırışlarına kompilyasiya olduğundan `React` hər zaman JSX-in scope-unda olmalıdır. -For example, both of the imports are necessary in this code, even though `React` and `CustomButton` are not directly referenced from JavaScript: +JavaScript-in `React` və `CustomButton` dəyişənlərinə birbaşa istinad etmədiyinə baxmayaraq, aşağıdakı kodda hər iki idxalın olması vacibdir: ```js{1,2,5} import React from 'react'; @@ -71,18 +71,18 @@ function WarningButton() { } ``` -If you don't use a JavaScript bundler and loaded React from a `