React Native Study Notes 2, reactnative
1: How to Create a react native Project
First, go to the specified folder and execute react-native init ReactNativeProject on the terminal. ReactNativeProject is the project name;
2: How
Recently in the study of react Native. The feeling of development efficiency is really good, but the JSX grammar is not very comfortable to write.Tried the sublime Text 3 and visual Studio code to write codes, feeling the reaction is always slow a pat.or want to change back VS2015 write jsx, but with vs write jsx seems to be only in the suffix of. jsx file inside write. (Do not know if the VS has directly s
Special statement: I code is not used for any commercial purposes, but some of the personal learning experience, in order to make later more programmers less go some detours. * (If infringement of your copyright will be forgiven) *.Development tools: Webstorm,xcode1. The creation of Rn is generally created with this, because the latest is the wall:React-native Init MyApp--version 0.44.32. example code for the class that is cited in the library:Import
1. Build the react-native environment in the CMD interface: refer to Https://reactnative.cn/docs/0.51/getting-started.html#content(1) npm install- g yarn react-native-cli Install the Yarn command tool and the react-native command
view:Http://facebook.github.io/react-native/docs/view.html#style)2.colors[colorproptype] set a drop-down refresh to load the color of the progress indicator, you can set multiple colors ( set of up to four )3.enabled BOOL set whether to start the drop-down refresh feature4.Progressbackgroundcolor colorproptype settings drop-down refresh the background color of the load indicator5.Refreshing bool to set the
Suppose we now have a need to customize a component that consists of a small icon and a text description of the icon, with a background color, a back-view setting, and a width height setting. As shown is the composition of two such components.First, in the Index.android.js directory to create a new JS file, named Item.js, enter the template code inside/*** Sample React Native app* https://github.com/faceboo
1. Can be installed according to the official installation instructions, personally feel a little bit of English is fully capable of document installation procedures (https://facebook.github.io/react-native/docs/ getting-started.html), the specific environment variable how to configure the Internet one of the searchIf you want to quickly install Node,python,java, and you do not want to set their environment
()}}
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
In-depth introduction to React Native 2: My first application, reactnative
This is the second article in The React Native tutorial.
1. Environment Configuration
After the React Native environment is configured, you can start to c
Nodejs once the front-end JS pushed to the server side, and the 15 FB react-native RN again to push JS to the mobile side of the development wave. The advantages of Rn are not repeated here, it is that we are accustomed to the server, web-side development, and do not want to spend too much time mastering the Android, iOS Mobile-native development of the people's
React native as a new thing, the relevant information is not muchThe official documentation is relatively simple and lacks some examples of systemsIn the application of react native, eager to learn some of the best practices of others. So I want to learn by reading the systemI have seen the
React Native Knowledge 11-Props (properties) and State (State), react11-props
I. Props (attributes)
Most components can be customized using various parameters during creation. These parameters are called properties ). Props is specified in the parent component, and once specified, it will not change in the lifecycle of the specified component
By using different attributes for customization in different scen
One: Props ( attribute)Most components can be customized with various parameters when they are created. These parameters, which are used for customization, are called Props (attributes). props is specified in the parent component and, once specified, is no longer changed in the lifetime of the specified component By using different property customizations in different scenarios, you can maximize the reuse of your custom components. Simply refer to This.props in the render function and then proce
. Misunderstanding of React's Virtual DOM. React never said "React is faster than native operation DOM." React's Basic thinking pattern is to re-render the entire application every time there is a change. If there is no Virtual DOM, the simple thing to do is to reset InnerHTML directly. Many people do not realize that in a large list of all the data has changed,
Recently trying to use React Native to do something, found that the real machine debugging or some pits exist. IOS Real-Computer debuggingFirst, you have to make the debug computer and your phone must be in the same WiFi network below
Open the files for your IOS project AppDelegate.m
Change jsCodeLocation to localhost your computer's local area network IP address
In Xcode , select your pho
First, the problem descriptionIn the process of configuring the development environment in accordance with the React-native configuration tutorial on the WIN7 platform on the network, when the difficult step to react-native run-android, it is found that there has been an error, as follows:The error description informat
teach you how to build iOS React native environment in your MacHttp://www.cnblogs.com/damnbird/p/6074607.htmlpreparatory work1. You need a Mac computer. (This is not nonsense?) What I'm using is air~~ poor. )2. The environment in which I operate the computer system isVersion 3.xcode: 8.0 official editionRequired Software1.HomebrewHomebrew, a Package manager for Mac Systems, is used to install Nodejs and som
First step: Export JS bundle and picture ResourcesUnlike the packaged react Native Android app, we can't export react Native iOS apps with the command step. We need to package the JS part of the code with the image resource, and then add it to the iOS project through Xcode.command to Export JS bundleUnder the root dire
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.