Skip to content

gitforalan/ReactNativeCodeReuseExample

Repository files navigation

React Native Code Reuse

This example shows how to reuse code between different platforms when using React & React Native. It is based on the fact that React Native will detect when a file has a .ios. or .android. extension and load the relevant platform file when required from other components (see Platform-specific extensions).

Installation

  1. Install npm
  2. From the root directory of the repository execute npm i

Run

Web

From the root directory of the repository execute gulp serve

iOS

Execute react-native run-ios or open ios/ReactNativeCodeReuse.xcodeproj with XCode and run the project.

About

Shows how to organize your code to reuse it as much as possible between Web, iOS and Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 54.4%
  • Objective-C 24.3%
  • Python 9.1%
  • Java 7.8%
  • HTML 2.2%
  • CSS 2.2%