We have started using react-native in our project, so Swift learns to lay down a period of time, studied RN for one months, and today shares the learning process:
Study Data collation:
1, react-native Chinese network: http://reactnative.cn/docs/0.27/getting-started.html (recommended, have questions to see the officia
?We can print it out, like iphone6s, this value is printed out width:375,height:667, because the 6s density is 2, so we know that the width of this is DP. Fitting scheme
So, here's the adaptation scheme in Rn: Take 6,6s as an example:UI design Prototypes: Based on Iphone6Resolution: 1334 x 750 px;Screen Size: 4.7 inchesDPI:326DPI (approximately equal to 320dpi,density=2)
Import {Dimensions} from ' react-native
After 3 weeks of time, the first two weeks and the exam, using some trivial time, finally the basic interface of the app to complete the function. Let's take a picture first.
The use of react-native 0.36 version of development, is a lot of the pit, to a simple summary of it.
To tell the truth, an application of user loyalty, the UI is absolutely a big relationship, which is my imitation of the Nuggets cli
Like Android, react's components also have a corresponding life cycle. The life cycle of the Android React native component can be summarized in the following diagram as a whole.The component life cycle can be broadly divided into three phases:
The first stage : The first drawing phase of the component, in the above dashed box, where the component loading and initialization is completed;
Second
Only write the next function, the style is not written, the great God do not laugh. Some need to improve the place to ask the great God guidance. qq:274501366
Not much to say directly on the code
Index.android.js
' Use strict ';
Import React, {Component} from ' React '; Import {appregistry, Image, StyleSheet, Text, View, Touchablehighlight, ListView, Refreshcontrol,} f
Rom '
there has been constantly around/back and forth, more than half an hour did not respond 5) Double-click the. Xcodeproject Error (I'm sorry I didn't capture and save the wrong information here) sudo chmod-r 777 project directory file name setting read-write permission to operate 6) Simulator Command + R does not refresh the interface Reference: https://github.com/facebook/react-native/issues/306 7) Prompt
Editor: This article is from the Ctrip framework Research and Development Department senior manager Wei Xiaojun in the second " Ctrip technology micro-sharing" on the sharing, the following is the collation of the text record. Click here for video playback . Follow Ctrip Technology Center Ctriptech to learn more about micro-sharing courses. As support for the development of native applications with JavaScript, Re
sethtml (WebView view, @Nullable String html) {LOG.E ("TAG", "sethtml");View.loaddata (HTML, "text/html; Charset=utf-8 "," UTF-8 ");}}As with native modules, native UI components also need to be registered to implement the reactpackage interface for WebView registration. Add this reactpackage to the Reactinstancemanager instance, in MainactivtyThen create a new Webview.js file on the JavaScript layer. Ente
React native uses props for data transfer and communication between pages. In react native, there are two ways to store and pass data: props (attributes) and state (states), Where:
Pr
React Native Concept Introduction noun explanationFirst, several key words are listed:
React
Native
React Native
These three words do not really have much to do with it, and we explain it individually:
component.You can also go back null or false show that you don't need to render anything. In fact, React renders a label to handle the current differential check logic. When returned null or false , it this.getDOMNode() is returned null .render()The function should be purely, meaning that the function does not modify the component state, each call returns the same result, does not read and write the DOM information, and does not interact with the br
Recommended 11 React Native Open Source Mobile UI componentsOschina posted 10 month ago, total 14 reviewsThis article recommends 11 great React Native Open source components, which hopefully will help mobile app developers.React Native is a recent Facebook
Will the cross-platform framework of mobile apps be Terminator? Come to visit React Native and facebookreact from Facebook
Initial Exploration of React Native use February 06 2015
Facebook allows all React Conf participants to get a taste of the source code of
React Native Version upgrade and downgrade (a) preface
Now react Native for Android is just open source soon, the overall function is not perfect and the development of the Pit (BUG) is still more, so far there is no official version. Project personnel are developing maintenance and fixing bugs, so it is relatively fas
Today encountered a very wonderful problem, and later in the StackOverflow above, is said to be a react-native bug.Original address: http://stackoverflow.com/questions/38579665/ Reactnative-activityindicator-not-showing-when-animating-property-initiate-false
For example, the following code:
Constructor (props) {Super (props
OverviewThe so-called life cycle, which is the state that an object undergoes from its inception to the last extinction, understands the life cycle of the space and is a knowledge point that must be mastered in the development. Just like components in Android development, React native's components also have a lifecycle (Lifecycle).The life cycle of the React native
()}}
Activeopacity={1}No hidden effect after clicking Trigger
4.ScrollView and flatlist-scrolling list, many properties, not listed; 5. image-Picture ContainerAvailable properties:
Source={require (' .../.../img/top.png ')}
6.modal-modal Frame
A warning or prompt that can be used as a toast without action for 2 seconds to disappear
Also available as an Action prompt dialog box with interactive buttons;
Ii. the CSS1 of RN. Style declaration:const StylesCo
The advent of React native has created two revolutionary innovations in mobile development: the integration of mobile app development, which not only shortens app development time, but also improves app development efficiency. Provides the foundation for mobile app dynamic updates.
This article will share the React Natvie application deployment/Dynamic update con
Reprinted from Kaich Blog (http://www.kaich.xyz) Contact react nativeFor technology, I prefer to chase new. Seeing the famous Facebook (open source model, releasing a lot of high-quality open-source frameworks) opened up a new framework for mobile cross-platform react native, so he couldn't wait to start touching it. The reac
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.