Typecasting? Coercion.

  • Explicit vs. Implicit coercion

    • const x = 42
    • const explicit = String(x) // explicit === '42'
    • const implicit = x + '' // implicit === '42'
  • == vs. ===

    • == coerces the types
    • === requires equivalent types

Debug

We can add debugger in code to add a breakpoint

funcA()
debugger  // Add a breakpoint
funcB()

Platform Extensions

// FancyButton.android.js
// FancyButton.ios.js

import FancyButton from './FancyButton'
// if ios: use FancyButton.ios.js
// if android: use FancyButton.android.js

Boilerplates

  • Snowflake A React-Native Android iOS Starter App/ BoilerPlate / Example with Redux, RN Router, & Jest with the Snowflake Hapi Server running locally or on RedHat OpenShift for the backend, or a Parse Server running locally or remotely on Heroku
  • Pepperoni React Native App Starter Kit for Android and iOS
  • Ignite The hottest CLI for React Native, boilerplates, plugins, generators, and more!

Resources

Awesome React Native Awesome React Native components, news, tools, and learning material!

GraphQL

GraphQL file structure

src
├── Components
└── GraphQL
    ├── MutationCreateEvent.js
    ├── MutationDeleteEvent.js
    ├── QueryAllEvent.js
    ├── QueryGetEvent.js
    └── SubscriptionEventComment.js