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

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
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
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
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
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
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
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 

Recently uploaded (20)

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
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...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
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
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
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
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune 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.