Time of Update: 2016-08-15
標籤:When you are using React components you need to be able to access specific references to individual components. This is done by defining a ref. Notice: ‘ref‘ only works in class component, not in statless component. If we don‘t add
Time of Update: 2016-05-23
標籤: smartClick:function(id,name,waiter,e){ var desk = $$(e.currentTarget).data(‘raw‘); if(this.lastClickTime[id] && ((new Date())-this.lastClickTime[id])>70) {//quick click twice ,
Time of Update: 2016-08-22
標籤:時間:2016-08-22 晚,西安1.安裝jdkjava version "1.6.0_45"Java(TM) SE Runtime Environment (build 1.6.0_45-b06)Java HotSpot(TM) Client VM (build 20.45-b01, mixed mode, sharing)2.下載sdk單獨安裝Android SDK,不FQ的環境下,為了速度可選擇使用
Time of Update: 2016-06-06
標籤:記下自己的react學習之路 ,官方文檔寫的很詳盡,學起來應該比較簡單官方文檔地址:react.http://reactjs.cn/react/docs/getting-started.html1.1 全域安裝命令列工具(依賴 npm)在任何目錄進行全域安裝,效果都是一樣的。所以可以不切入到專案檔夾。npm install -g react-tools 1.2jsx檔案轉成標準的 JavaScript: jsx --watch
Time of Update: 2016-09-06
標籤:首先介紹一下整體的樣式及實現的效果,點擊添加按鈕會接著後面新增一行,點擊操作下的刪除表徵圖將會刪掉一行,如果刪掉序號為1的行,第二行會自動變成第一行序號也會隨之改變。ps:資料互動均還未實現。介紹完畢:下面正題!1.布局import React, { Component, PropTypes } from ‘react‘;import { Table, DatePicker, Select, InputNumber, Input, Button, Icon } from ‘antd‘;//
Time of Update: 2016-09-05
標籤:Text用於顯示文本的React組件,並且它也支援嵌套、樣式,以及觸摸處理。在下面的例子裡,嵌套的標題和本文文字會繼承來自styles.baseText的fontFamily字型樣式,不過標題上還附加了它自己額外的樣式。標題和文本會在頂部依次堆疊,並且被代碼中內嵌的分行符號分隔開。一:屬性1:allowFontScaling bool(iOS特有):控制字型是否要根據iOS的“文字大小”輔助選項來進行縮放。2:numberOfLines number
Time of Update: 2016-08-15
標籤:State is used for properties on a component that will change, versus static properties that are passed in. This lesson will introduce you to taking input within your React components. Unlike props, which are meant to be passed into our
Time of Update: 2016-08-13
標籤:1:運行React Native報串連錯誤解決解決方式:在終端進入專案檔裡,然後執行:(cd Pods/React; npm run start) 2:組件生命週期介紹建立階段 1、 getDefaultProps作用於組件類,也就是調用React.createClass()的時候被調用。 每次建立組件的時候執行且只執行一次,方式如 reload Js。用來處理props的預設值。note :
Time of Update: 2016-08-13
標籤:前言匯總下比較實用的atom外掛程式[偏react開發的]-- 暫時應該沒有比我更全面的!嘎嘎atom-react-autocomplete–項目內,組件名及狀態的自動補全 autocomplete-js-import–模組匯入智能提示 emmet-jsx-css-modules– React內的Emmet補全,非單純的expand【class => className 】!!language-javascript-jsx – JavaScript, ES6, ES7, React
Time of Update: 2016-07-25
標籤:(中間因為應付各種考試,處理其他事情,隔了好時間沒更新,現在終於有時間了,續上!)本文為React初始體驗,因此先不考慮檔案如何組織,盡量以最簡單的方式讓大家瞭解React其中的原理。在建立組件(component)之前,大家首先需要瞭解一些基礎知識。有ES6、JSX文法等基礎知識的同學請跳過下面一段。ES6是JavaScript的最新標準,裡面新增了許多文法方式,甚至出現了“類”的繼承方式,我個人暫且把他們理解為新增了許多“文法糖”,這些&
Time of Update: 2016-07-25
標籤:The way you make HTTP requests in React Native is with the Fetch API. In this video we‘ll talk about Fetch and how to work with promises.As we build application components, we will need to pass data along as we change routes and bring them into
Time of Update: 2016-07-04
標籤:最近搞一個pc端的活動,搞了一個多月,甚煩,因為相比於pc端,更喜歡移動端多一點。因為移動端又能搞我的react了. 今天主要總結一下react當中tab切換的幾種方式,因為tab切換基本上都會用到。當然,你也可以在react當中用jquery或者zepto來實現,不過既然都用react了,能不能用jq,就盡量不用jq。不過不得不吐槽一下,在jquery很簡單的東西,在react中稍微複雜化了一點。 目前我用到的tab切換隻有兩種方式,所以暫時總結這兩種,以後有遇到其他的再總結
Time of Update: 2016-06-25
標籤:1,React的開發背景2,React的特點3,React的開發環境搭建3.1 下載FaceBook官方的基礎代碼 :facebook.github.io/react/index.html3.2 文字編輯器Sublime Text3安裝 3.2.1 下載sublime Text3下載 地址:http://www.sublimetext.com/3
Time of Update: 2016-06-13
標籤:moles-packermoles-packer 是由攜程架構團隊研發的,與攜程moles架構配套使用的React Native 打包和拆包工具,同時支援原生的 React Native 項目。github地址npm地址安裝#從npm倉庫中安裝。npm install -g moles-packer擷取協助資訊moles-packer --help使用#在React Native項目根目錄下執行命令moles-packer --input /path/to/project --entry
Time of Update: 2016-06-02
標籤:明後兩天,ReactEurope 2016大會在巴黎舉行,本次大會演講主題有:React Native(動畫及運行效能最佳化)Flux-like 資料架構(GraphQL 最佳實務與展望、Redux 發展方向、Falcor 介紹、Flux 架構 debug)工具(Flow、Exponent IDE、Recompose)大會網址:https://www.react-europe.org上線了 CTO
Time of Update: 2016-05-13
標籤:ICONS是可以直接使用圖片名, 就能載入圖片的三方,使用很方便, 你不需要在工程檔案夾裡塞各種圖片, 節省很多空間,下面就來看看怎麼使用吧!1. 首先開啟terminal進入到我們的工程檔案夾下, (不會建立工程的請參考:http://blog.csdn.net/margaret_mo/article/details/51304062)輸入: npm install react-native-vector-icons --save (斷行符號)輸入: npm
Time of Update: 2016-05-03
標籤: 最近一直在思考一個問題,react的單向資料流面對深層次組件集合(redux
Time of Update: 2016-04-20
標籤:react-native中CameraRoll模組提供了訪問本地相簿的功能。在react版本為0.23.0的項目中,不支援Android,而且在iOS中使用CameraRoll還需要我們手動操作:iOS:將RCTCameraRoll.xcodeproj添加到我們的項目中:展開項目 > Libraies 右鍵Libraies點擊 “Add Files to ‘項目名’
Time of Update: 2016-04-20
標籤:滑動查看圖片第三方組件:react-native-swiper,現在的版本為:1.4.3,該版本還不支援Android。下面介紹的是該組件的一些用法,可能總結的不完整,希望大家一起來共同完善。官方文檔:https://github.com/leecade/react-native-swiper:安裝npm install --save react-native-swiper基礎用法import React,
Time of Update: 2016-04-18
標籤:我們在做APP的時候,與案頭應用系統不同的是觸摸響應。web頁面對觸摸響應的支援和原生的APP有著很大的差異。基本用法 componentWillMount: function() { this._panResponder = PanResponder.create({ // 要求成為響應者: onStartShouldSetPanResponder: (evt, gestureState) => true,