Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React-nativeの紹介

 React-nativeの紹介

React-nativeの紹介。yidel 第24回勉強会で発表

裕美 吉田

July 02, 2016
Tweet

More Decks by 裕美 吉田

Other Decks in Technology

Transcript

  1. &:0⒏DF։ൃ 8FC 7 w ΞδΞϦʔάΞΠεϗοέʔ wIUUQXXXBMIPDLZKQ wνʔϜɾબखͷ੒੷ूܭ w1FSMಠࣗϑϨʔϜϫʔΫ wΞϩϋύʔΫ wIUUQQBSLBMPIB

    TUSFFUDPN w4/4 w+BWB4FBTBS wωοτγϣοϓ wIUUQXXXCPSPDPKQ w3BJMTK2VFSZ w34QFD$VDVNCFS w๖͑τʔΫ ੠༏ͱ4LZQF Ͱ͓࿩  wIUUQXXXNPFUBMLKQ w੠༏ͱͷձ࿩༧໿༧໿ w3BJMTK2VFSZ w34QFD3FRVFTU
  2. "KBYෳࡶ 21 controller model view HTML (css, image) request HTML

    Server Browser JS request HTML state, data
  3. 41" 22 controller model request Server Browser JS controller model

    view HTML css, image JSON iOS / Android request JSON $MJFOUTJEF.7$ͱݺ͹ΕΔࣄ΋͋Δ
  4. &:0⒏DF 3FBDUKT γϯϓϧͳϓϩάϥϛϯάϞσϧͱੑೳΛཱ྆ 27 override func viewDidLoad() { super.viewDidLoad() self.instance

    = XXXX1 ͍Ζ͍Ζઃఆ } @IBAction func pushButton(sender: AnyObject) { self.instance = XXXX2 ඞཁͳ৔ॴΛॻ͖׵͑Δ } ը໘ͷঢ়ଶΛॳظԽ ը໘શମΛදࣔ Ұ෦Λ࠶දࣔ ը໘ͷঢ়ଶΛมߋ Button J04 K2VFSZʜ Πϕϯτ
  5. &:0⒏DF 3FBDUKT γϯϓϧͳϓϩάϥϛϯάϞσϧͱੑೳΛཱ྆ 28 class Top extends Component { constructor(props)

    { super(props) this.state = { . . . } } render() { <શը໘දࣔ༻ίʔυ> } onClick(event) { this.stat.xxx = {XXXX} } } ը໘ͷঢ়ଶΛॳظԽ ը໘શମΛදࣔ ࣗಈతʹҰ෦ͷΈ Λ࠶දࣔ ը໘ͷঢ়ଶΛมߋ Button 3FBDUKT Πϕϯτ
  6. 38 &4 &4 var PI = 3.141592 function square(x) {

    return x * x; } function tax(n, rate) { if (rate == undefined) rate = 0.08; return Math.floor(n * rate); } const PI = 3.141592 square = (x) => x * x tax = (n, rate = 0.08) => Math.floor(n * rate) &4 &4
  7. 39 &4 &4 Jyanken = (function() { function Jyanken(hand) {

    this.hand = hand; } jyanken.prototype.poi = function() { return this.hand = Math.floor(Math.random() * 3); }; jyanken.prototype.judge = function(your) { if (this.hand === your.hand) { return "Ҿ͖෼͚"; } else if ( ..লུ.. ) { return "উͪ"; } else { return "ෛ͚"; } }; return Jyanken; })(); class Jyanken { constructor(hand) { this.hand = hand } poi() { this.hand = Math.floor(Math.random() * 3) } judge(your) { if (this.hand === your.hand) { return "Ҿ͖෼͚" } else if ( ..লུ.. ) { return "উͪ" } else { return "ෛ͚" } } } &4 &4