SlideShare a Scribd company logo
1 of 29
Download to read offline
SOIL 

Expo
2018/08/01
• 

• 

• 

•
CPS Cyber Physical System 

• 

• Python JavaScript

• ActionScript, Objective-C, ...
• SRP OIL 

• IoT, AI, VR, AR 

• 

• ※ 10:00~18:00

• Code for Fukuoka 

• 

• 

• facebook Code for Fukuoka
※
facebook
https://www.facebook.com/
SRPOIL/
• Expo 

• React 

• React SPA Single Page Application 

• 

1. 

• React 

2. 

• Code for Fukuoka
✓React 

✓Expo 

✓
1.
React
React
• Declarative
• 

• 

• Component-Based
• UI 

• JavaScript JS
DOM 

• Learn Once, Write Anywhere
• JS React


• Node React Native
https://reactjs.org/
Declarative
•


•


• 

•
(+ 1 2 3 4 5) ;15
var sum = function(arr){
var sum=0;
for(var i=0; i < arr.length; i++){
sum += arr[i];
}
return sum;
}
var arr = [1, 2, 3, 4, 5];
console.log( sum(arr) ); // 15
sum [1,2,3,4,5] --15
https://tylermcginnis.com/imperative-vs-declarative-programming/
function double (arr) {
let results = []
for (let i = 0; i < arr.length; i++){
results.push(arr[i] * 2)
}
return results
}
function double (arr) {
return arr.map((item) => item * 2)
}
function add (arr) {
let result = 0
for (let i = 0; i < arr.length; i++){
result += arr[i]
}
return result
}
function add (arr) {
return arr.reduce((prev, current) => prev + current, 0)
}
$("#btn").click(function() {
$(this).toggleClass("highlight")
$(this).text() === 'Add Highlight'
? $(this).text('Remove Highlight')
: $(this).text('Add Highlight')
})
<Btn
onToggleHighlight={this.handleToggleHighlight}
highlight={this.state.highlight}>
{this.state.buttonText}
</Btn>
• CBD: Component-based development 

• separation of
concerns 

•


• 

• Web Web


• 

•
https://en.wikipedia.org/wiki/Component-based_software_engineering
https://medium.com/@dan.shapiro1210/understanding-component-based-architecture-3ff48ec0c238
React
class Welcome extends React.Component {
state = {name: 'Anzu'};
shouldComponentUpdate(nextProps, nextState){
const {name} = nextState;
return (name === 'Hina');
}
handleClick = ()=>{
this.setState({name: 'Hina'})
};
render() {
return (
<div>
<h1>Hello, {this.props.name}</h1>
<div onClick={this.handleClick}>My name is {this.state.name}</div>
</div>
);
}
}
class App extends React.Component {
render() {
return (
<div>
<Welcome name="Taro" />
<Welcome name="Hanako" />
</div>
);
}
}
View
Learn Once, Write Anywhere
• Java 

• Write once, run anywhere 

•


•


• React

• iOS, android : React Native

• Win, Mac React Desktop (https://reactdesktop.js.org/)
https://reactjs.org/blog/2015/03/26/introducing-react-native.html
ES2015 ECMAScript2015
• ES6 6th Edition 

•
let
let name = 'taro'; 

name = 'hanako'
const
const name = 'taro';

name = 'hanako'; // error
class
class Person {

constructor(name){

this.name = name;

}

}

const person = new Person('taro')
const fn = (name) =>{

return console.log(name);

}
const arr = ['a', 'b', 'c'];

const arr2 = [...arr];

console.log(arr === arr2); // false
const name = 'taro';

console.log(`My name is ${name}.`); // My name is taro.
https://babeljs.io/docs/en/learn/
JSX JavaScript XML, JavaScript Syntax Extension
• XML JavaScript
<MyButton color="blue" shadowSize={2}>
Click Me
</MyButton>
React.createElement(
MyButton,
{color: 'blue', shadowSize: 2},
'Click Me'
)
JSX React.createElement(component, props, ...children)

<div className="sidebar" />
React.createElement(
'div',
{className: 'sidebar'},
null
)
https://reactjs.org/docs/introducing-jsx.html
DOM
• DOM ReactDOM
DOM 

• DOM 

• DOM DOM
Key
https://reactjs.org/docs/faq-internals.html
{todos.map((todo, index) =>

<Todo

{...todo}

key={index}

/>

)}

https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318
{todos.map((todo) =>

<Todo {...todo}

key={todo.id} />

)}

var shortid = require('shortid');

function createNewTodo(text) {

return {

completed: false,

id: shortid.generate(),

text

}

}

ID
shortid
ID
ID todoCounter = 1;

function createNewTodo(text) {

return {

completed: false,

id: todoCounter++,

text

}

}
Functional
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
class Welcome extends React.Component {
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}
•


•
class Welcome extends React.Component {
state = {name:'anzu'}
componentDidMount() {
}
componentWillUnmount() {
}
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}
React ver. 16.4
http://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/
Flux
• Facebook 

• 

• 

•
https://github.com/facebook/flux/tree/master/examples/flux-concepts
React
Parent Component
class ChildComponent extends React.Component {
render() {
const { onClick } = this.props;
return (
<div>
<div onClick={onClick}>Click here!</div>
</div>
);
}
}
class ParentComponent extends React.Component {
handleClick = (e)=>{
console.log('Click!');
};
render() {
return (
<div>
<ChildComponent onClick={this.handleClick} />
</div>
);
}
}
ChildComponent
MVC
• UI 

• Model

• 

• View 

• View

• Model 

• Controller

• Model
https://ja.wikipedia.org/wiki/Model_View_Controller
React Native
• JavaScript React


• HTML5
https://facebook.github.io/react-native/docs/tutorial
https://facebook.github.io/react-native/
import React, { Component } from 'react';
import { Text, View } from 'react-native';
export default class HelloWorldApp extends Component {
render() {
return (
<View>
<Text>Hello world!</Text>
</View>
);
}
}
• React Native 

• Expo SDK,
Expo
XDE


hello, world
• https://expo.io/

• Expo
2. 

Code for Fukuoka
•


• 2018 3 3 

• SRP 

•


•


•
•
•

More Related Content

What's hot

"Lego Programming" with Lorzy
"Lego Programming" with Lorzy"Lego Programming" with Lorzy
"Lego Programming" with Lorzyclkao
 
Drones, Flying robots and Javascript
Drones, Flying robots and JavascriptDrones, Flying robots and Javascript
Drones, Flying robots and JavascriptLaurent Eschenauer
 
Advanced programming with #nodecopter
Advanced programming with #nodecopterAdvanced programming with #nodecopter
Advanced programming with #nodecopterLaurent Eschenauer
 
node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ioSteven Beeckman
 
What's New in JavaScript
What's New in JavaScriptWhat's New in JavaScript
What's New in JavaScriptDan Cohn
 
Modernizes your objective C - Oliviero
Modernizes your objective C - OlivieroModernizes your objective C - Oliviero
Modernizes your objective C - OlivieroCodemotion
 
An Introduction To jQuery
An Introduction To jQueryAn Introduction To jQuery
An Introduction To jQueryAndy Gibson
 
ES6 in Production [JSConfUY2015]
ES6 in Production [JSConfUY2015]ES6 in Production [JSConfUY2015]
ES6 in Production [JSConfUY2015]Guillermo Paz
 
"Writing Maintainable JavaScript". Jon Bretman, Badoo
"Writing Maintainable JavaScript". Jon Bretman, Badoo"Writing Maintainable JavaScript". Jon Bretman, Badoo
"Writing Maintainable JavaScript". Jon Bretman, BadooYandex
 
Getting started with ES6 : Future of javascript
Getting started with ES6 : Future of javascriptGetting started with ES6 : Future of javascript
Getting started with ES6 : Future of javascriptMohd Saeed
 

What's hot (11)

"Lego Programming" with Lorzy
"Lego Programming" with Lorzy"Lego Programming" with Lorzy
"Lego Programming" with Lorzy
 
Drones, Flying robots and Javascript
Drones, Flying robots and JavascriptDrones, Flying robots and Javascript
Drones, Flying robots and Javascript
 
Advanced programming with #nodecopter
Advanced programming with #nodecopterAdvanced programming with #nodecopter
Advanced programming with #nodecopter
 
node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
 
What's New in JavaScript
What's New in JavaScriptWhat's New in JavaScript
What's New in JavaScript
 
Modernizes your objective C - Oliviero
Modernizes your objective C - OlivieroModernizes your objective C - Oliviero
Modernizes your objective C - Oliviero
 
An Introduction To jQuery
An Introduction To jQueryAn Introduction To jQuery
An Introduction To jQuery
 
ES6 in Production [JSConfUY2015]
ES6 in Production [JSConfUY2015]ES6 in Production [JSConfUY2015]
ES6 in Production [JSConfUY2015]
 
"Writing Maintainable JavaScript". Jon Bretman, Badoo
"Writing Maintainable JavaScript". Jon Bretman, Badoo"Writing Maintainable JavaScript". Jon Bretman, Badoo
"Writing Maintainable JavaScript". Jon Bretman, Badoo
 
"Clean" Architecture
"Clean" Architecture"Clean" Architecture
"Clean" Architecture
 
Getting started with ES6 : Future of javascript
Getting started with ES6 : Future of javascriptGetting started with ES6 : Future of javascript
Getting started with ES6 : Future of javascript
 

Similar to Expoによるモバイルアプリ開発入門

React Native Evening
React Native EveningReact Native Evening
React Native EveningTroy Miles
 
JavaScript 2016 for C# Developers
JavaScript 2016 for C# DevelopersJavaScript 2016 for C# Developers
JavaScript 2016 for C# DevelopersRick Beerendonk
 
JavaScript in 2015
JavaScript in 2015JavaScript in 2015
JavaScript in 2015Igor Laborie
 
Arquitetura Java em 2007 (Java Architecture in 2007)
Arquitetura Java em 2007 (Java Architecture in 2007)Arquitetura Java em 2007 (Java Architecture in 2007)
Arquitetura Java em 2007 (Java Architecture in 2007)Phil Calçado
 
NetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf EditionNetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf EditionPaulo Morgado
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptVisual Engineering
 
C#7, 7.1, 7.2, 7.3 e C# 8
C#7, 7.1, 7.2, 7.3 e C# 8C#7, 7.1, 7.2, 7.3 e C# 8
C#7, 7.1, 7.2, 7.3 e C# 8Giovanni Bassi
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Tugdual Grall
 
Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8Wilson Su
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web DevsRami Sayar
 
Fitc whats new in es6 for web devs
Fitc   whats new in es6 for web devsFitc   whats new in es6 for web devs
Fitc whats new in es6 for web devsFITC
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureSimon Willison
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptHazelcast
 

Similar to Expoによるモバイルアプリ開発入門 (20)

React Native Evening
React Native EveningReact Native Evening
React Native Evening
 
JS class slides (2016)
JS class slides (2016)JS class slides (2016)
JS class slides (2016)
 
JavaScript 2016 for C# Developers
JavaScript 2016 for C# DevelopersJavaScript 2016 for C# Developers
JavaScript 2016 for C# Developers
 
JS Class 2016
JS Class 2016JS Class 2016
JS Class 2016
 
JavaScript in 2015
JavaScript in 2015JavaScript in 2015
JavaScript in 2015
 
Arquitetura Java em 2007 (Java Architecture in 2007)
Arquitetura Java em 2007 (Java Architecture in 2007)Arquitetura Java em 2007 (Java Architecture in 2007)
Arquitetura Java em 2007 (Java Architecture in 2007)
 
ECMAScript 6
ECMAScript 6ECMAScript 6
ECMAScript 6
 
NetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf EditionNetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf Edition
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
 
C#7, 7.1, 7.2, 7.3 e C# 8
C#7, 7.1, 7.2, 7.3 e C# 8C#7, 7.1, 7.2, 7.3 e C# 8
C#7, 7.1, 7.2, 7.3 e C# 8
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007
 
AkJS Meetup - ES6++
AkJS Meetup -  ES6++AkJS Meetup -  ES6++
AkJS Meetup - ES6++
 
Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8Practical JavaScript Programming - Session 1/8
Practical JavaScript Programming - Session 1/8
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web Devs
 
JavaScript ES6
JavaScript ES6JavaScript ES6
JavaScript ES6
 
Fitc whats new in es6 for web devs
Fitc   whats new in es6 for web devsFitc   whats new in es6 for web devs
Fitc whats new in es6 for web devs
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
 

More from Takayuki Goto

ros2_cmd_api : ROS2コマンド機能のAPIを提供するROS2パッケージ.pdf
ros2_cmd_api :  ROS2コマンド機能のAPIを提供するROS2パッケージ.pdfros2_cmd_api :  ROS2コマンド機能のAPIを提供するROS2パッケージ.pdf
ros2_cmd_api : ROS2コマンド機能のAPIを提供するROS2パッケージ.pdfTakayuki Goto
 
OculusのPassthrough APIを使ってみた
OculusのPassthrough APIを使ってみたOculusのPassthrough APIを使ってみた
OculusのPassthrough APIを使ってみたTakayuki Goto
 
WindowsではじめるROSプログラミング
WindowsではじめるROSプログラミングWindowsではじめるROSプログラミング
WindowsではじめるROSプログラミングTakayuki Goto
 
DockerでCKANを動かそう
DockerでCKANを動かそうDockerでCKANを動かそう
DockerでCKANを動かそうTakayuki Goto
 
オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)Takayuki Goto
 
オープンデータを使ったモバイルアプリ開発(入門編)
オープンデータを使ったモバイルアプリ開発(入門編)オープンデータを使ったモバイルアプリ開発(入門編)
オープンデータを使ったモバイルアプリ開発(入門編)Takayuki Goto
 
オープンデータを使った モバイルアプリ開発入門
オープンデータを使ったモバイルアプリ開発入門オープンデータを使ったモバイルアプリ開発入門
オープンデータを使った モバイルアプリ開発入門Takayuki Goto
 

More from Takayuki Goto (7)

ros2_cmd_api : ROS2コマンド機能のAPIを提供するROS2パッケージ.pdf
ros2_cmd_api :  ROS2コマンド機能のAPIを提供するROS2パッケージ.pdfros2_cmd_api :  ROS2コマンド機能のAPIを提供するROS2パッケージ.pdf
ros2_cmd_api : ROS2コマンド機能のAPIを提供するROS2パッケージ.pdf
 
OculusのPassthrough APIを使ってみた
OculusのPassthrough APIを使ってみたOculusのPassthrough APIを使ってみた
OculusのPassthrough APIを使ってみた
 
WindowsではじめるROSプログラミング
WindowsではじめるROSプログラミングWindowsではじめるROSプログラミング
WindowsではじめるROSプログラミング
 
DockerでCKANを動かそう
DockerでCKANを動かそうDockerでCKANを動かそう
DockerでCKANを動かそう
 
オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)
 
オープンデータを使ったモバイルアプリ開発(入門編)
オープンデータを使ったモバイルアプリ開発(入門編)オープンデータを使ったモバイルアプリ開発(入門編)
オープンデータを使ったモバイルアプリ開発(入門編)
 
オープンデータを使った モバイルアプリ開発入門
オープンデータを使ったモバイルアプリ開発入門オープンデータを使ったモバイルアプリ開発入門
オープンデータを使った モバイルアプリ開発入門
 

Recently uploaded

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 

Expoによるモバイルアプリ開発入門

  • 2. • • • • CPS Cyber Physical System • • Python JavaScript • ActionScript, Objective-C, ...
  • 3. • SRP OIL • IoT, AI, VR, AR • • ※ 10:00~18:00 • Code for Fukuoka • • • facebook Code for Fukuoka ※ facebook https://www.facebook.com/ SRPOIL/
  • 4. • Expo • React • React SPA Single Page Application • 1. • React 2. • Code for Fukuoka
  • 6. 1.
  • 8. React • Declarative • • • Component-Based • UI • JavaScript JS DOM • Learn Once, Write Anywhere • JS React • Node React Native https://reactjs.org/
  • 9. Declarative • • • • (+ 1 2 3 4 5) ;15 var sum = function(arr){ var sum=0; for(var i=0; i < arr.length; i++){ sum += arr[i]; } return sum; } var arr = [1, 2, 3, 4, 5]; console.log( sum(arr) ); // 15 sum [1,2,3,4,5] --15
  • 10. https://tylermcginnis.com/imperative-vs-declarative-programming/ function double (arr) { let results = [] for (let i = 0; i < arr.length; i++){ results.push(arr[i] * 2) } return results } function double (arr) { return arr.map((item) => item * 2) } function add (arr) { let result = 0 for (let i = 0; i < arr.length; i++){ result += arr[i] } return result } function add (arr) { return arr.reduce((prev, current) => prev + current, 0) } $("#btn").click(function() { $(this).toggleClass("highlight") $(this).text() === 'Add Highlight' ? $(this).text('Remove Highlight') : $(this).text('Add Highlight') }) <Btn onToggleHighlight={this.handleToggleHighlight} highlight={this.state.highlight}> {this.state.buttonText} </Btn>
  • 11. • CBD: Component-based development • separation of concerns • • • Web Web • • https://en.wikipedia.org/wiki/Component-based_software_engineering https://medium.com/@dan.shapiro1210/understanding-component-based-architecture-3ff48ec0c238
  • 12. React class Welcome extends React.Component { state = {name: 'Anzu'}; shouldComponentUpdate(nextProps, nextState){ const {name} = nextState; return (name === 'Hina'); } handleClick = ()=>{ this.setState({name: 'Hina'}) }; render() { return ( <div> <h1>Hello, {this.props.name}</h1> <div onClick={this.handleClick}>My name is {this.state.name}</div> </div> ); } } class App extends React.Component { render() { return ( <div> <Welcome name="Taro" /> <Welcome name="Hanako" /> </div> ); } } View
  • 13. Learn Once, Write Anywhere • Java • Write once, run anywhere • • • React • iOS, android : React Native • Win, Mac React Desktop (https://reactdesktop.js.org/) https://reactjs.org/blog/2015/03/26/introducing-react-native.html
  • 14.
  • 15. ES2015 ECMAScript2015 • ES6 6th Edition • let let name = 'taro'; name = 'hanako' const const name = 'taro'; name = 'hanako'; // error class class Person {
 constructor(name){ this.name = name; } } const person = new Person('taro') const fn = (name) =>{ return console.log(name); } const arr = ['a', 'b', 'c']; const arr2 = [...arr]; console.log(arr === arr2); // false const name = 'taro'; console.log(`My name is ${name}.`); // My name is taro. https://babeljs.io/docs/en/learn/
  • 16. JSX JavaScript XML, JavaScript Syntax Extension • XML JavaScript <MyButton color="blue" shadowSize={2}> Click Me </MyButton> React.createElement( MyButton, {color: 'blue', shadowSize: 2}, 'Click Me' ) JSX React.createElement(component, props, ...children)
 <div className="sidebar" /> React.createElement( 'div', {className: 'sidebar'}, null ) https://reactjs.org/docs/introducing-jsx.html
  • 17. DOM • DOM ReactDOM DOM • DOM • DOM DOM Key https://reactjs.org/docs/faq-internals.html {todos.map((todo, index) => <Todo {...todo} key={index} /> )} https://medium.com/@robinpokorny/index-as-a-key-is-an-anti-pattern-e0349aece318 {todos.map((todo) => <Todo {...todo} key={todo.id} /> )} var shortid = require('shortid'); function createNewTodo(text) { return { completed: false, id: shortid.generate(), text } } ID shortid ID ID todoCounter = 1; function createNewTodo(text) { return { completed: false, id: todoCounter++, text } }
  • 18. Functional function Welcome(props) { return <h1>Hello, {props.name}</h1>; } class Welcome extends React.Component { render() { return <h1>Hello, {this.props.name}</h1>; } } • • class Welcome extends React.Component { state = {name:'anzu'} componentDidMount() { } componentWillUnmount() { } render() { return <h1>Hello, {this.props.name}</h1>; } }
  • 20. Flux • Facebook • • • https://github.com/facebook/flux/tree/master/examples/flux-concepts React
  • 21. Parent Component class ChildComponent extends React.Component { render() { const { onClick } = this.props; return ( <div> <div onClick={onClick}>Click here!</div> </div> ); } } class ParentComponent extends React.Component { handleClick = (e)=>{ console.log('Click!'); }; render() { return ( <div> <ChildComponent onClick={this.handleClick} /> </div> ); } } ChildComponent
  • 22. MVC • UI • Model • • View • View • Model • Controller • Model https://ja.wikipedia.org/wiki/Model_View_Controller
  • 23. React Native • JavaScript React • HTML5 https://facebook.github.io/react-native/docs/tutorial https://facebook.github.io/react-native/ import React, { Component } from 'react'; import { Text, View } from 'react-native'; export default class HelloWorldApp extends Component { render() { return ( <View> <Text>Hello world!</Text> </View> ); } }
  • 24. • React Native • Expo SDK, Expo XDE 

  • 27. Code for Fukuoka • • 2018 3 3 • SRP • • •
  • 28.
  • 29.