?? ?????????? ????????? ????
?? ??? ????? (?? ??????? React Native)
?? ???? ??? ????????? ???? ?????
???? ???
????? ??? ????
???
???.
[?]
??? ?????? ???? ????? ?????????? ???????
???????
?
[?]
iOS
? UWP
[?]
?? ????? ???????? ????? ??????? ??
React
?? ????? ?????????? ????? ?????? ???? ??? ???? ??????? ???? ???????.
?? ??? ????? ?? ????? ????? ??? ?????? ????.
?? ??? ?????
???? ???????
????? ????: ≪???????? ??????? ?? ?? ?? ????? ?? ???? ????? ?????? ??? ?? ?? ?? ??? HTML ?? ?????? ?? ??????? ??? ?????≫.
[?]
?? ??? ??? ??
???
?? ???? ?? ????? ???? ???? ????? ?? ????? ???.
?? ????
???
? ???? ???? ???? ?? ???? ????? ?????
UI
???? IOS ?? ?? ?? ?????
???? ???????
???? ???.
[?]
???? ????? ?????? ??
??????
????? ?? ???? ????? ???
????? ?????
?????? ?? ???? ?? ????
?????????? ?????
?? ??? ???????? ?????.
[?]
?? ?? ??? ??? ??????
???
????? ???? ?? ???? ???????? ?? ??? ???? ??????? ?? ??? ???? ????? ???. ?? ????? ?? ??? ????
[?]
???????? ???? ????? ??? ??
???
?? ?????? ?? ??? ????? ???? ????? ?????? ???? ? ?????? ?????? ???? ??? ??????? ????????.
[??]
??????????
[
??????
]
???? ??? React Native ??????? ??
React
????? ???? ?? ?? ????? ?? ??? ??????
DOM
?? ?? ????
DOM ?????
??????? ???????. ??? ?????? ?? ?????? ?? ????? (??
???? ???????
????? ??? ???? ????? ??????? ?? ????? ??????) ?????? ?????? ?? ?????? ????? (?????? ?????) ???? ?????? ? ?? ?????? ????? ?? ???? ??
????? ????
? ????????? ? ??
?????? ???????
?????? ?????? ??????.
[??]
[??]
React Native ?? HTML ??????? ???????. ?? ???? ????????? ?? ???? ??????? ???? ????? ???????? ????? ??????? ??????.
???? Hello World
[
??????
]
?? ??????
Hello, World
?? ?? React Native ??? ???? ???:
// App.js
import
React
,
{
Component
}
from
'react'
;
import
{
Text
,
View
}
from
'react-native'
;
export
default
class
App
extends
Component
{
render
()
{
return
(
<
View
>
<
Text
>
Hello
,
World
.
<
/Text>
<
/View>
);
}
}
// index.js
import
{
AppRegistry
}
from
'react-native'
;
import
App
from
'./App'
;
import
{
name
as
appName
}
from
'./app.json'
;
22
AppRegistry
.
registerComponent
(
appName
,
()
=>
App
);