Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Minicurso de React-Native
Search
Felipe Pontes
January 27, 2018
Programming
66
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Minicurso de React-Native
GDG Natal Meeting #12
Felipe Pontes
January 27, 2018
More Decks by Felipe Pontes
See All by Felipe Pontes
Minicurso de React-Native
felipemfp
0
140
Explorando dados com Pandas
felipemfp
1
130
Introdução ao React-Native
felipemfp
1
61
GeoGuide: Our stack, libraries and structure
felipemfp
0
48
Iniciando com Git e GitHub
felipemfp
0
74
Other Decks in Programming
See All in Programming
Agentic UI
manfredsteyer
PRO
0
200
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
280
The NotImplementedError Problem in Ruby
koic
1
930
Datadog LLM Observabilityで実現する 安全なLLM Usage 管理
3150
0
110
RTSPクライアントを自作してみた話
simotin13
0
630
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
100
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
160
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
210
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
740
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
190
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
0
9.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
400
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Scaling GitHub
holman
464
140k
Designing for Performance
lara
611
70k
How STYLIGHT went responsive
nonsquared
100
6.2k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
240
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Transcript
Minicurso de React-Native com @felipemfp e @chicobentojr
Agenda • Introdução ao React • Introdução ao React-Native •
Componentes Inclusos • Componentes Open-Source • Expo • Prática
Introdução ao React
Apenas uma biblioteca
Tudo são componentes
Componentes interativos, testáveis e reutilizáveis
Ciclo de vida simplificado
Ciclo de vida
Como escrevemos componentes em React? • Componentes são objetos •
render() e JSX
JSX
Como escrevemos componentes em React? • Possuem props e state
• Possuem métodos: ◦ setState() ◦ getInitialState() ◦ getDefaultProps() ◦ [...]
props
state
Componentes stateless
Como escrevemos componentes em React? • Dados fluem numa única
direção • Renderização conforme necessário (Virtual DOM)
Virtual DOM
Introdução ao React-Native
React-Native é React
Introdução ao React-Native • Componentes são renderizados como componentes nativos
• Os mesmos conceitos são utilizados para construir aplicações • Suporte oficial para iOS e Android • Suporte ainda para Universal Windows
Introdução ao React-Native • Ciclo de vida (props, state...) do
componentes são o mesmo • Continuamos usando JSX
CSS é um pouco diferente
Adicionando estilo aos componentes nativos • “CSS” como prop •
StyleSheet é quase CSS
StyleSheet
Construindo layout com React-Native • O mesmo Flexbox da web
• Com diferentes defaults: ◦ flexDirection: column ◦ alignItems: stretch
Componentes inclusos
Componentes inclusos • ActivityIndicator • Button • CheckBox • DatePickerIOS
• DrawerLayoutAndroid • FlatList • Image • KeyboardAvoidingView • ListView • MaskedViewIOS • Modal • NavigatorIOS • Picker • Picker.Item • PickerIOS • ProgressBarAndroid • ProgressViewIOS • RefreshControl • ScrollView • SectionList • SegmentedControlIOS • Slider • SnapshotViewIOS • StatusBar
Componentes inclusos • Switch • TabBarIOS • TabBarIOS.Item • Text
• TextInput • ToolbarAndroid • TouchableHighlight • TouchableNativeFeedback • TouchableOpacity • TouchableWithoutFeedback • View • ViewPagerAndroid • VirtualizedList • WebView
API inclusas • AccessibilityInfo • ActionSheetIOS • Alert • AlertIOS
• Animated • AnimatedValue • AnimatedValueXY • AppRegistry • AppState • AsyncStorage • BackAndroid • BackHandler • CameraRoll • Clipboard • DatePickerAndroid • Dimensions • Easing • Geolocation • ImageEditor • ImagePickerIOS • ImageStore • InteractionManager • Keyboard • LayoutAnimation
API inclusas • Linking • NetInfo • PanResponder • PermissionsAndroid
• PixelRatio • PushNotificationIOS • Settings • Share • StatusBarIOS • StyleSheet • Systrace • TimePickerAndroid • ToastAndroid • Vibration • VibrationIOS • Layout Props • Picker Style Props • Shadow Props
Componentes Open-Source http://www.awesome-react-native.com/
None
None
None
None
Expo
Expo é React-Native • Apenas JavaScript • Fácil prototipagem •
Rápido desenvolvimento
Expo para desenvolvedores e clientes
Prática github.com/cades-ifrn/minicurso-react-native-gdg-natal
Passo 0 - Iniciar o projeto • create-react-native-app pitaco-de-musica •
cd pitaco-de-musica Com npm: • npm install --save react-navigation axios • npm run start Com yarn: • yarn add react-navigation axios • yarn start
Passo 1 - Adicionar React-Navigation • Criar componente HomeScreen •
Utilizar componente StackNavigator
Passo 2 - Criar tela de início • Utilizar componente
Image • Utilizar componente ScrollView • Utilizar componente Button • Estilizar componentes
Passo 3 - Navegar entre telas • Criar componente SearchScreen
• Adicionar SearchScreen no navegador raiz • Adicionar evento para realizar navegação
Passo 4 - Pesquisar e Apresentar Resultados • Utilizar componente
FlatList • Criar componente Header • Criar componente Item • Carregar resultados
Passo 5 - Melhorar UI e utilizar APIs • Utilizar
Alert API • Criar componente ResultItem
Passo 6 - Adicionar exploração • Adicionar evento ao clicar
num resultado
Próximos passos
The Complete React Native and Redux Course https://goo.gl/2NYB6H
How to Become a React Native Developer in 2018 https://goo.gl/ggdZJE
Obrigado! Felipe Pontes Francisco Bento @felipemfp @chicobentojr