Blogpost about react-native-git-upgrade

This commit is contained in:
Martin Konicek
2016-12-05 16:38:07 +00:00
parent f9a5f018c5
commit 63133832fb
12 changed files with 77 additions and 10 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
<!DOCTYPE html><html><head><title>0.36: Headless JS, the Keyboard API, &amp; more</title><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width"><meta property="fb:app_id" content="1677033832619985"><meta property="fb:admins" content="121800083"><meta property="og:site_name" content="React Native"><meta property="og:title" content="0.36: Headless JS, the Keyboard API, &amp; more"><meta property="og:url" content="https://facebook.github.io/react-native/blog/2016/10/25/0-36-headless-js-the-keyboard-api-and-more.html"><meta property="og:image" content="https://facebook.github.io/react-native/img/opengraph.png"><meta property="og:description" content="Today we are releasing React Native 0.36. Read on to learn more about what&#x27;s new."><meta name="twitter:site" content="@reactnative"><meta name="twitter:card" content="summary_large_image"><meta property="og:type" content="article"><meta property="article:author" content="Héctor Ramos"><meta name="twitter:creator" content="@hectorramos"><base href="/react-native/releases/next/"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"><link rel="shortcut icon" href="img/favicon.png?2"><link rel="stylesheet" href="css/react-native.css"><link rel="alternate" type="application/rss+xml" title="React Native Blog" href="https://facebook.github.io/react-native/blog/feed.xml"><link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script><script type="text/javascript">try{Typekit.load();}catch(e){}</script></head><body><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><div class="container"><div class="nav-main"><div class="wrap"><a class="nav-home" href=""><img src="img/header_logo.png">React Native</a><a class="nav-version" href="/react-native/versions.html">next</a><div class="nav-site-wrapper"><ul class="nav-site nav-site-internal"><li><a href="docs/getting-started.html" class="" data-target=".nav-docs">Docs</a></li><li><a href="/react-native/support.html" class="">Help</a></li><li><a href="/react-native/showcase.html" class="">Showcase</a></li><li><a href="/react-native/blog/" class="active">Blog</a></li></ul><div class="algolia-search-wrapper"><input id="algolia-doc-search" tabindex="0" type="text" placeholder="Search docs..."></div><ul class="nav-site nav-site-external"><li><a href="https://github.com/facebook/react-native" class="">GitHub</a></li><li><a href="http://facebook.github.io/react" class="">React</a></li></ul></div></div></div><div class="hero"><div class="wrap"><div class="text"><strong>React Native Blog</strong></div><div class="minitext">Stay up-to-date with the latest React Native news and events.</div></div></div><section class="content wrap documentationContent"><article class="entry-body"><header class="entry-header"><h4 class="entry-authordate"><a href="https://twitter.com/hectorramos" target="_blank" class="author">Héctor Ramos</a> — <time class="date">October 25, 2016</time></h4><h1 class="entry-title">0.36: Headless JS, the Keyboard API, &amp; more</h1></header><div class="entry-content"><div><p>Today we are releasing <a href="https://github.com/facebook/react-native/releases/tag/v0.36.0" target="_blank">React Native 0.36</a>. Read on to learn more about what&#x27;s new.</p><h2><a class="anchor" name="headless-js"></a>Headless JS <a class="hash-link" href="#headless-js">#</a></h2><p>Headless JS is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music. It is only available on Android, for now.</p><p>To get started, define your async task in a dedicated file (e.g. <code>SomeTaskName.js</code>):</p><div class="prism language-javascript">module<span class="token punctuation">.</span>exports <span class="token operator">=</span> async <span class="token punctuation">(</span>taskData<span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token punctuation">{</span>
<!DOCTYPE html><html><head><title>0.36: Headless JS, the Keyboard API, &amp; more</title><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width"><meta property="fb:app_id" content="1677033832619985"><meta property="fb:admins" content="121800083"><meta property="og:site_name" content="React Native"><meta property="og:title" content="0.36: Headless JS, the Keyboard API, &amp; more"><meta property="og:url" content="https://facebook.github.io/react-native/blog/2016/10/25/0-36-headless-js-the-keyboard-api-and-more.html"><meta property="og:image" content="https://facebook.github.io/react-native/img/opengraph.png"><meta property="og:description" content="Today we are releasing React Native 0.36. Read on to learn more about what&#x27;s new."><meta name="twitter:site" content="@reactnative"><meta name="twitter:card" content="summary_large_image"><meta property="og:type" content="article"><meta property="article:author" content="Héctor Ramos"><meta name="twitter:creator" content="@hectorramos"><base href="/react-native/"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"><link rel="shortcut icon" href="img/favicon.png?2"><link rel="stylesheet" href="css/react-native.css"><link rel="alternate" type="application/rss+xml" title="React Native Blog" href="https://facebook.github.io/react-native/blog/feed.xml"><link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script><script type="text/javascript">try{Typekit.load();}catch(e){}</script></head><body><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><div class="container"><div class="nav-main"><div class="wrap"><a class="nav-home" href=""><img src="img/header_logo.png">React Native</a><a class="nav-version" href="/react-native/versions.html"></a><div class="nav-site-wrapper"><ul class="nav-site nav-site-internal"><li><a href="docs/getting-started.html" class="" data-target=".nav-docs">Docs</a></li><li><a href="/react-native/support.html" class="">Help</a></li><li><a href="/react-native/showcase.html" class="">Showcase</a></li><li><a href="/react-native/blog/" class="active">Blog</a></li></ul><div class="algolia-search-wrapper"><input id="algolia-doc-search" tabindex="0" type="text" placeholder="Search docs..."></div><ul class="nav-site nav-site-external"><li><a href="https://github.com/facebook/react-native" class="">GitHub</a></li><li><a href="http://facebook.github.io/react" class="">React</a></li></ul></div></div></div><div class="hero"><div class="wrap"><div class="text"><strong>React Native Blog</strong></div><div class="minitext">Stay up-to-date with the latest React Native news and events.</div></div></div><section class="content wrap documentationContent"><article class="entry-body"><header class="entry-header"><h4 class="entry-authordate"><a href="https://twitter.com/hectorramos" target="_blank" class="author">Héctor Ramos</a> — <time class="date">October 25, 2016</time></h4><h1 class="entry-title">0.36: Headless JS, the Keyboard API, &amp; more</h1></header><div class="entry-content"><div><p>Today we are releasing <a href="https://github.com/facebook/react-native/releases/tag/v0.36.0" target="_blank">React Native 0.36</a>. Read on to learn more about what&#x27;s new.</p><h2><a class="anchor" name="headless-js"></a>Headless JS <a class="hash-link" href="#headless-js">#</a></h2><p>Headless JS is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music. It is only available on Android, for now.</p><p>To get started, define your async task in a dedicated file (e.g. <code>SomeTaskName.js</code>):</p><div class="prism language-javascript">module<span class="token punctuation">.</span>exports <span class="token operator">=</span> async <span class="token punctuation">(</span>taskData<span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token punctuation">{</span>
<span class="token comment" spellcheck="true"> // Perform your task here.
</span><span class="token punctuation">}</span></div><p>Next, register your task in on <code>AppRegistry</code>:</p><div class="prism language-javascript">AppRegistry<span class="token punctuation">.</span><span class="token function">registerHeadlessTask<span class="token punctuation">(</span></span><span class="token string">&#x27;SomeTaskName&#x27;</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token function">require<span class="token punctuation">(</span></span><span class="token string">&#x27;SomeTaskName&#x27;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span></div><p>Using Headless JS does require some native Java code to be written in order to allow you to start up the service when needed. Take a look at our new <a href="/react-native/docs/headless-js-android.html" target="">Headless JS docs</a> to learn more!</p><h2><a class="anchor" name="the-keyboard-api"></a>The Keyboard API <a class="hash-link" href="#the-keyboard-api">#</a></h2><p>Working with the on-screen keyboard is now easier with <a href="/react-native/docs/keyboard.html" target=""><code>Keyboard</code></a>. You can now listen for native keyboard events and react to them. For example, to dismiss the active keyboard, simply call <code>Keyboard.dismiss()</code>:</p><div class="prism language-javascript">import <span class="token punctuation">{</span> Keyboard <span class="token punctuation">}</span> from <span class="token string">&#x27;react-native&#x27;</span>
<span class="token comment" spellcheck="true">
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+13 -1
View File
@@ -2,12 +2,24 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://facebook.github.io/react-native/blog/</id>
<title>React Native Blog</title>
<updated>2016-11-08T00:00:00Z</updated>
<updated>2016-12-05T00:00:00Z</updated>
<link rel="alternate" href="https://facebook.github.io/react-native/blog/"/>
<subtitle>The best place to stay up-to-date with the latest React Native news and events.</subtitle>
<logo>https://facebook.github.io/react-native/img/header_logo.png</logo>
<rights>Copyright © 2016 Facebook Inc.</rights>
<generator>Feed for Node.js</generator>
<entry>
<title type="html"><![CDATA[Easier Upgrades Thanks to Git]]></title>
<id>https://facebook.github.io/react-native/blog/2016/12/05/easier-upgrades.html</id>
<link href="https://facebook.github.io/react-native/blog/2016/12/05/easier-upgrades.html">
</link>
<updated>2016-12-05T00:00:00Z</updated>
<summary type="html"><![CDATA[Upgrading to new versions of React Native has been difficult. You might have seen something like this before:]]></summary>
<author>
<name>Nicolas Cuillery</name>
<uri>https://twitter.com/ncuillery</uri>
</author>
</entry>
<entry>
<title type="html"><![CDATA[Introducing Button, Faster Installs with Yarn, and a Public Roadmap]]></title>
<id>https://facebook.github.io/react-native/blog/2016/11/08/introducing-button-yarn-and-a-public-roadmap.html</id>
Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

+1 -1
View File
File diff suppressed because one or more lines are too long