{"id":286504,"date":"2017-05-17T19:05:04","date_gmt":"2017-05-17T15:05:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286504"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2017-05-17T15:05:04","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286504","title":{"rendered":"\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e React Native \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 iOS. \u0427\u0430\u0441\u0442\u044c 1.4 \u2014 1.5"},"content":{"rendered":"<p>\u2192 \u041f\u0435\u0440\u0435\u0432\u043e\u0434 <a href=\"https:\/\/www.smashingmagazine.com\/2016\/04\/the-beauty-of-react-native-building-your-first-ios-app-with-javascript-part-1\/\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a><br \/>  \u2192 \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u044b\u043f\u0443\u0441\u043a\u0438:  <\/p>\n<ul>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/328752\/\">\u0427\u0430\u0441\u0442\u044c 1.1<\/a> <\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/328834\/\"> \u0427\u0430\u0441\u0442\u044c 1.2-1.3<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2>4. \u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u043e\u0442\u0431\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0431\u043e\u0435\u0432<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0431\u043e\u0435\u0432 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438. \u0420\u0430\u0437\u0434\u0435\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d JS, \u043d\u0435\u0436\u0435\u043b\u0438 React Native. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c (\u0444\u0430\u0439\u043b), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0415\u0441\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u00bb \u0432\u0430\u043c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a <a href=\"https:\/\/nodejs.org\/api\/modules.html#modules_modules\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Node.js \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c<\/a>. <br \/>  \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443, \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u043a\u043b\u0430\u0441\u0441   <\/p>\n<pre><code class=\"javascript\">class SplashWalls extends Component{\/* ... *\/}; <\/code><\/pre>\n<p><a name=\"habracut\"><\/a><br \/>  \u0438 \u0432\u044b\u0448\u0435 \u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u043e\u0435\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c:  <\/p>\n<pre><code class=\"javascript\">const NUM_WALLPAPERS = 5; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0412 \u043c\u043e\u0434\u0443\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445:  <\/p>\n<ul>\n<li><code>uniqueRandomNumbers():<\/code> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 3 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f. \u0412\u0442\u043e\u0440\u043e\u0439 \u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0438\u0436\u043d\u0438\u0439 (<code>lowerLimit <\/code>) \u0438 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 (<code>upperLimit<\/code>) \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 <code>uniqueRandomNumbers(5, 10, 20);<\/code>, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 5 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b,<br \/>   \u043e\u0442 10 \u0434\u043e 20.<\/li>\n<li><code>randomNumberInRange():<\/code> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0438\u0436\u043d\u0438\u0439 \u0438 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u0446\u0438\u0438 <\/li>\n<\/ul>\n<p>  \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u044f \u043f\u0440\u0438\u0432\u0435\u0440\u0436\u0435\u043d\u0435\u0446 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u044e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 The Single Responsibility Principle, SRP (\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u2014 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D1%80%D0%B8%D0%BD%D1%86%D0%B8%D0%BF_%D0%B5%D0%B4%D0%B8%D0%BD%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D0%BE%D0%B9_%D0%BE%D1%82%D0%B2%D0%B5%D1%82%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D0%B8\">\u0432\u0438\u043a\u0438<\/a>). SRP \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0432\u0435\u0449\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c \u0438\u0437\u0431\u0430\u0432\u0438\u0442 \u043e\u0442 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c. <br \/>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0442\u043e\u043c \u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u0444\u0430\u0439\u043b <b>index.ios.js<\/b>. \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435, \u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0433\u0434\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044d\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 <b>index.ios.js<\/b>. <br \/>  \u041c\u044b \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <b>RandManager.js<\/b>. \u0415\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:  <\/p>\n<pre><code class=\"javascript\">module.exports = { \tuniqueRandomNumbers(numRandomNumbers, lowerLimit, upperLimit) { \t\tvar uniqueNumbers = []; \t\twhile( uniqueNumbers.length != numRandomNumbers ) { \t\t\tvar currentRandomNumber = this.randomNumberInRange(lowerLimit, upperLimit); \t\t\tif( uniqueNumbers.indexOf(currentRandomNumber) === -1 )  \t\t\t\tuniqueNumbers.push(currentRandomNumber); \t\t} \t\treturn uniqueNumbers; \t},  \trandomNumberInRange(lowerLimit, upperLimit) { \t\treturn Math.floor( Math.random() * (1 + upperLimit - lowerLimit) ) + lowerLimit; \t}  }; <\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u0444\u0430\u0439\u043b index.ios.js. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u043e\u0441\u043b\u0435 `use strict`:  <\/p>\n<pre><code class=\"javascript\">'use strict'; \/***\/ var RandManager = require(\u2018.\/RandManager.js\u2019); \/***\/ <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u043e\u0431\u043e\u0438 <code>fetchWallsJSON()<\/code>:  <\/p>\n<pre><code class=\"javascript\">fetchWallsJSON() {   var url = 'http:\/\/unsplash.it\/list';   fetch(url)     .then( response =&gt; response.json() )     .then( jsonData =&gt; {     \/***\/       var randomIds = RandManager.uniqueRandomNumbers(NUM_WALLPAPERS, 0, jsonData.length);       var walls = [];       randomIds.forEach(randomId =&gt; {         walls.push(jsonData[randomId]);       });        this.setState({         isLoading: false,         wallsJSON: [].concat(walls)       });     \/***\/     })     .catch( error =&gt; console.log('JSON Fetch error : ' + error) ); } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c JSON \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 randomIds. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u043e\u0431\u043e\u0438 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c id \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 walls. <br \/>  \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f: isLoading \u0432 false, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0438 wallsJSON \u0432 walls. <br \/>  \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e renderResults():  <\/p>\n<pre><code class=\"javascript\">renderResults() { \/***\/   var {wallsJSON, isLoading} = this.state;   if( !isLoading ) {     return (          . &lt;View&gt;         {wallsJSON.map((wallpaper, index) =&gt; {           return(             &lt;Text key={index}&gt;               {wallpaper.id}             &lt;\/Text&gt;           );         })}            .&lt;\/View&gt;     );   } \/***\/ } <\/code><\/pre>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 renderResults() \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 ES2015. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"javascript\">var wallsJSON = this.state.wallsJSON, \tisLoading = this.state.isLoading; <\/code><\/pre>\n<p>  \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430:  <\/p>\n<pre><code class=\"javascript\">var {wallsJSON, isLoading} = this.state; <\/code><\/pre>\n<p>  ES2015 \u043a\u0440\u0443\u0442, \u044f \u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432\u0430\u043c. <br \/>  \u0412 View \u043c\u044b \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 wallsJSON, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/map\">map()<\/a>.<br \/>  \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u043c\u0430\u0441\u0441\u0438\u0432 (\u0438\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e) \u043e\u0431\u043e\u0435\u0432 \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 (id) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e key:  <\/p>\n<pre><code class=\"javascript\">&lt;Text key={index}&gt; <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/web\/faf\/6c9\/13d\/faf6c913d88541bea0b63a723212d42e.png\"\/><\/div>\n<p>  \u041c\u044b \u0432\u0438\u0434\u0438\u043c 5 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 id \u043e\u0431\u043e\u0435\u0432. \u0415\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c {wallpaper.id} \u043d\u0430 {wallpaper.author} \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 renderResults(), \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/web\/1e6\/4e2\/2ca\/1e64e22ca3e544d9837552989c238dae.png\"\/><\/div>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u043e\u0435\u0432 (5 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435) \u0438\u0437 API. \u0414\u0430\u0439 \u043f\u044f\u0442\u044c!  <\/p>\n<h2>5. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 Swiper<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Swiper. \u042d\u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u043e\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0431\u043e\u043a (<a href=\"https:\/\/www.youtube.com\/watch?v=BG9Cxgylue0\">Youtube <\/a>(en)). <br \/>  \u041c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b React Native \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0423 RN \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0438 \u043d\u0430 GitHub \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 <a href=\"https:\/\/react.parts\/native\">\u0431\u043e\u0433\u0430\u0442\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e<\/a> \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. <br \/>  \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/leecade\/react-native-swiper\">react-native-swiper<\/a>.<br \/>  \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0438 \u043d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"javascript\">npm install react-native-swiper --save <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:  <\/p>\n<pre><code class=\"javascript\">`use strict` \/***\/ var Swiper = require(\u2018react-native-swiper\u2019); \/***\/ <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c Swiper. <br \/>  \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434 renderResults() \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 View \u043d\u0430 Swiper. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434 renderResults() \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"javascript\">renderResults() {   var {wallsJSON, isLoading} = this.state;   if( !isLoading ) {     return (     \/***\/       &lt;Swiper&gt;     \/***\/         {wallsJSON.map((wallpaper, index) =&gt; {           return(             &lt;Text key={index}&gt;               {wallpaper.author}             &lt;\/Text&gt;           );         })}     \/***\/       &lt;\/Swiper&gt;     \/***\/     );   } } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a \u0432 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/web\/331\/339\/a62\/331339a62484411b8a8d261c03445499.png\"\/><\/div>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043e\u0431\u043e\u0435\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430, \u043c\u044b \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u0445 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 <br \/>  \u044d\u043a\u0440\u0430\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u043f\u0440\u0430\u0432\u043e-\u0432\u043b\u0435\u0432\u043e (\u043a\u0440\u0443\u0442\u043e! \u2014 \u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430). <br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432:  <\/p>\n<pre><code class=\"javascript\">&lt;Swiper \/***\/ dot.{&lt;View style={{backgroundColor:'rgba(255,255,255,.4)', width: 8, height: 8,borderRadius: 10, marginLeft: 3, marginRight: 3, marginTop: 3, marginBottom: 3,}} \/&gt;}  activeDot.{&lt;View style={{backgroundColor: '#fff', width: 13, height: 13, borderRadius: 7, marginLeft: 7, marginRight: 7}} \/&gt;}  loop={false}  onMomentumScrollEnd={this.onMomentumScrollEnd} \/***\/ &gt;   {wallsJSON.map((wallpaper, index) =&gt; {     return(       &lt;Text key={index}&gt;         {wallpaper.author}       &lt;\/Text&gt;     );   })} &lt;\/Swiper&gt; <\/code><\/pre>\n<p>  \u041c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438:<\/p>\n<ul>\n<li>\u0422\u043e\u0447\u043a\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432\u043d\u0438\u0437\u0443 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441\u0442\u0430\u043b\u0438 \u0431\u0435\u043b\u044b\u043c\u0438 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0438\u0441\u044c \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 <\/li>\n<li>\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043a\u0440\u0443\u0433\u0443 (loop={false}). \u0422\u043e \u0435\u0441\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0434\u043e\u0439\u0434\u0451\u0442\u0435 \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u043f\u0435\u0440\u0435\u043b\u0438\u0441\u0442\u043d\u0443\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435, \u0432\u044b \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0451\u0442\u0435 \u043d\u0430 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c onMomentumScrollEnd (\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043f\u043e\u0437\u0436\u0435) \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u0430\u043a \u043c\u044b \u043f\u0435\u0440\u0435\u043b\u0438\u0441\u0442\u043d\u0443\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <\/li>\n<\/ul>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u043a\u043e\u043d\u0446\u0443 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u041a\u0430\u043a\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435!  <\/p>\n<h2>\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433\u0438<\/h2>\n<p>  <\/p>\n<ol>\n<li>\u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 RN \u0432 Xcode. <\/li>\n<li>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e ES2015 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f (state) \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c JSON \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 API. <\/li>\n<li>\u0412 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f (state). \u0418 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 flexbox \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. <\/li>\n<li>\u0412 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. <\/li>\n<li>\u0412 \u043f\u044f\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Node. <\/li>\n<\/ol>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u043c, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u042f \u0437\u043d\u0430\u044e. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u043e\u0435\u0432 \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u043c\u0435\u043d \u0430\u0432\u0442\u043e\u0440\u043e\u0432. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u0432\u043e\u0439\u043d\u044b\u0445 \u0442\u0430\u043f\u043e\u0432 (double-tap \u2014 \u043d\u0435 \u0437\u043d\u0430\u044e \u043a\u0430\u043a \u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438, \u044f \u0442\u0430\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u044d\u0442\u043e \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043f\u0430\u043b\u044c\u0446\u0435\u043c \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443, \u043d\u043e \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043d\u0435\u0442? \u2014 \u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430.) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 PanHandler. \u041c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 Xcode \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043a Camera Roll (\u043f\u043e-\u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u043e\u0433 \u00ab\u0413\u0430\u043b\u0435\u0440\u0435\u0438\u00bb \u0432 Android \u2014 \u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0449\u0435. \u0417\u0432\u0443\u0447\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e? \u0423\u0432\u0438\u0434\u0438\u043c\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438. <br \/>  PS. \u041a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0433\u0434\u0435 \u043d\u0430\u0434\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0442?<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/328904\/\"> https:\/\/habrahabr.ru\/post\/328904\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2192 \u041f\u0435\u0440\u0435\u0432\u043e\u0434 <a href=\"https:\/\/www.smashingmagazine.com\/2016\/04\/the-beauty-of-react-native-building-your-first-ios-app-with-javascript-part-1\/\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a><br \/>  \u2192 \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u044b\u043f\u0443\u0441\u043a\u0438:  <\/p>\n<ul>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/328752\/\">\u0427\u0430\u0441\u0442\u044c 1.1<\/a> <\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/328834\/\"> \u0427\u0430\u0441\u0442\u044c 1.2-1.3<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2>4. \u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u043e\u0442\u0431\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0431\u043e\u0435\u0432<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0431\u043e\u0435\u0432 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438. \u0420\u0430\u0437\u0434\u0435\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d JS, \u043d\u0435\u0436\u0435\u043b\u0438 React Native. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c (\u0444\u0430\u0439\u043b), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0415\u0441\u043b\u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u00bb \u0432\u0430\u043c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a <a href=\"https:\/\/nodejs.org\/api\/modules.html#modules_modules\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Node.js \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c<\/a>. <br \/>  \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443, \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u043a\u043b\u0430\u0441\u0441   <\/p>\n<pre><code class=\"javascript\">class SplashWalls extends Component{\/* ... *\/}; <\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-286504","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=286504"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286504\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}