Skip to content

Instantly share code, notes, and snippets.

@skierkowski
Last active March 3, 2017 18:54
Show Gist options
  • Save skierkowski/3416b8ace0166eefa495 to your computer and use it in GitHub Desktop.
Save skierkowski/3416b8ace0166eefa495 to your computer and use it in GitHub Desktop.

My React Native Practices

This isn't so much "Best" practices, but rather "My" practices I try to follow.

Build & Deploy

  • Setup CodePush to deploy the app
  • Use Fastlane to build the project and deploy as-needed
  • Use BitRise as CI as CI service, it has great mobile support
  • I'm Working on creating RN-specific actions for Fastlane

Structure & Syntax

  • index.ios.js and index.android.js are thin loaders to /app/index.js
  • All JS and static assets are in /app folder
  • Use a consistent Javascript Syntax, preferrably ES2015
  • Use a single JS code-base for both Android & iOS

Components

Dependencies

  • Avoid using dependencies that are not supported for both platforms
  • Use dependencies that support React Native Package Manager, or make PR if they don't.
@skierkowski
Copy link
Author

@brandon-collins Think this might be of interest to you.

@j2kun
Copy link

j2kun commented Mar 3, 2017

@skierkowski Do you use a specific action for deploying to codepush via fastlane?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment