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: content/docs/react-without-jsx.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
id: react-without-jsx
3
-
title: React Without JSX
3
+
title: React JSX nélkül
4
4
permalink: docs/react-without-jsx.html
5
5
---
6
6
7
-
JSX is not a requirement for using React. Using React without JSX is especially convenient when you don't want to set up compilation in your build environment.
7
+
Nem kötelező a JSXet választani, ha Reactot használsz. A React JSX nélkül különösen hasznos, ha nem akarsz külön fordítási lépést létrehoznod a build környezetedben.
8
8
9
-
Each JSX element is just syntactic sugar for calling `React.createElement(component, props, ...children)`. So, anything you can do with JSX can also be done with just plain JavaScript.
9
+
Minden egyes JSX elem csak egy rövidítés a `React.createElement(component, props, ...children)` metódus hívására. Így, mindent amit JSXel le tudsz írni, meg tudod csinálni JSX nélkül, síma JavaScriptet használva is.
10
10
11
-
For example, this code written with JSX:
11
+
Például, ez a JSXet használó kódrészlet
12
12
13
13
```js
14
14
classHelloextendsReact.Component {
@@ -23,7 +23,7 @@ ReactDOM.render(
23
23
);
24
24
```
25
25
26
-
can be compiled to this code that does not use JSX:
26
+
átírható a következő, JSXet nem használó kódra:
27
27
28
28
```js
29
29
classHelloextendsReact.Component {
@@ -37,12 +37,11 @@ ReactDOM.render(
37
37
document.getElementById('root')
38
38
);
39
39
```
40
+
Próbáld ki [az online Babel fordítót](babel://jsx-simple-example), ha szeretnél több példát látni rá, hogyan alakítjuk át a JSXet JavaScriptté.
40
41
41
-
If you're curious to see more examples of how JSX is converted to JavaScript, you can try out [the online Babel compiler](babel://jsx-simple-example).
42
+
A komponens megadható sztringként, a `React.Component` alosztályaként vagy egy sima függvényként.
42
43
43
-
The component can either be provided as a string, as a subclass of `React.Component`, or a plain function.
44
-
45
-
If you get tired of typing `React.createElement` so much, one common pattern is to assign a shorthand:
44
+
Ha úgy érzed, hogy túl időigényes mindig kigépelni a `React.createElement`et, egy gyakori megoldás, a függvény egy rövidítéshez rendelése:
46
45
47
46
```js
48
47
conste=React.createElement;
@@ -52,8 +51,7 @@ ReactDOM.render(
52
51
document.getElementById('root')
53
52
);
54
53
```
54
+
A `React.createElement`nek ezt a rövidített formáját használva, már sokkal kényelmesebben React kódot írni, még JSX nélkül is.
55
55
56
-
If you use this shorthand form for `React.createElement`, it can be almost as convenient to use React without JSX.
57
-
58
-
Alternatively, you can refer to community projects such as [`react-hyperscript`](https://github.com/mlmorg/react-hyperscript) and [`hyperscript-helpers`](https://github.com/ohanhi/hyperscript-helpers) which offer a terser syntax.
56
+
Ha inkább más alternatív megoldást keresel, nézz bele a közösségi projektbe mint amilyen a [`react-hyperscript`](https://github.com/mlmorg/react-hyperscript) és a [`hyperscript-helpers`](https://github.com/ohanhi/hyperscript-helpers) amik segíthetnek tömörebb kódot írni.
0 commit comments