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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Felipe Pontes
January 27, 2018
Programming
65
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
59
GeoGuide: Our stack, libraries and structure
felipemfp
0
47
Iniciando com Git e GitHub
felipemfp
0
73
Other Decks in Programming
See All in Programming
Oxlintのカスタムルールの現況
syumai
6
1.1k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
760
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
160
dRuby over BLE
makicamel
2
340
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.3k
ふつうのFeature Flag実践入門
irof
7
4k
OSもどきOS
arkw
0
570
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Designing Experiences People Love
moore
143
24k
The untapped power of vector embeddings
frankvandijk
2
1.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Google's AI Overviews - The New Search
badams
0
1k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
150
Discover your Explorer Soul
emna__ayadi
2
1.1k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Are puppies a ranking factor?
jonoalderson
1
3.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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