React Native Flashcards

1
Q

What is React Native

A
  • JS framework for mobile app development that renders to native iOS and Android code
  • built on top of React JS
  • uses React platform to create a bridge between JS sytax and host platform
  • React components return markup, React uses the markup on DOM, React Native translates the markup to the host platform
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

core components

A
Text
Image
View
TextInput
ListView
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

virtual DOM

A
  • React creates an in-memory data structure cache, computers the resulting differences and then updates the browser’s displayed DOM efficiently.
  • React libraries only render subcomponents that actually change.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Flexbox

A
  • works the same way as it does in CSS on the web

- provides a fixed layout on different screen sizes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

FlatList

A

component that displays the content in similarly structured data as a scrollable list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

geolocation

A

use the Location Services :

  • React-native-geolocation-service
  • React-native-location
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

props

A
  • short for properties
  • immutable
  • components receive props from their parent
  • enables code reuse
// Parent 
export default class ScreenOne extends React.Component {
  render () {
    return (
)   } }
// Child component
export default class Heading extends React.Component {
  render () {
    return (
    {this.props.message}
    )
  }
}
Heading.propTypes = {
  message: PropTypes.string
}
Heading.defaultProps = {
  message: 'Heading One'
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

state

A
  • internal to a component
  • mutable
  • handles data that is changeable
  • use setState to update state objects

class Form extends React.Component {

  constructor (props) {
     super(props)
     this.state = {
       input: ''
     }
  }

handleChangeInput = (text) => {
this.setState({ input: text })
}

render () {
const { input } = this.state

return (

  )
}  }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

StyleSheet.create

A
  • ensures that values are immutable and opaque

- only created once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Steps to create and start a React Native app

A
  1. npm install -g create-react-native-app
  2. create-react-native-app AwesomeProject
  3. cd AwesomeProject
  4. npm start
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

XHR Module

A

used for implementation of XMLHttpRequest to post data on the server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

function used to pass values between screens

A

this.props.navigation.navigate(‘RouteName, { /* params go here */ })

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

JavaScriptCore

A
  • open-source Web browser engine which runs in Webkit.

- helps developers create own browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

WebView

A
  • component that is implemented to load a web page or web content
  • bridge that connects web platforms with React Native
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Gesture Responder System

A

manages lifecycle of gestures in the app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

native events supported by React Native

A
Clipboard Events
Composition Events
Keyboard Events
Focus Events
Form Events
Mouse Events
Pointer Events
Selection Events
Touch Events
UI Events
Wheel Events
Media Events
Image Events
Animation Events
Transition Events
17
Q

React Native Platform module

A

used to detect the platform of the device

18
Q

timer related functions

A

setTimeout, clearTimeout
setInterval, clearInterval
setImmediate, clearImmediate
requestAnimationFrame, cancelAnimationFrame