In React, components manage their own state. In this lesson, we'll walk through building a component which manages it's own state as well as using TextInput and TouchableHighlight to handle touch events. import React, { Component, PropTypes } from 'r…
react native环境搭建请移步:react native环境搭建 这里说说react native创建完成之后,运行中出现的常见问题, 问题1: java.lang.RuntimeException: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. 这个是原因是工程找不到我们的and…
React Native is an Objective-C application framework that bridges JavaScript applications running in the JSCore JavaScript engine to iOS and Android native APIs. In theory, you write your application logic in JSX and ES6/7 and transpile it to JavaScr…
1.react-native run-android 报错SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. 解决方法:需在android根目录添加local.properties文件 文件内容: sdk.dir = /Users/[username]/Library/Android/sdk …
.babelrc { "presets": [ "react-native" ], "sourceMaps": true } Many JavaScript developers are used to simply log stuff into the console when debugging their software. This works kinda okay. Sadly it seems the console feature…