$ npm install react-native-thermal-state --save
$ react-native link react-native-thermal-state
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-thermal-stateand addRNThermalState.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNThermalState.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
- Open up
android/app/src/main/java/[...]/MainActivity.java- Add
import com.reactlibrary.RNThermalStatePackage;to the imports at the top of the file - Add
new RNThermalStatePackage()to the list returned by thegetPackages()method
- Add
- Append the following lines to
android/settings.gradle:include ':react-native-thermal-state' project(':react-native-thermal-state').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thermal-state/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-thermal-state')
- In Visual Studio add the
RNThermalState.slninnode_modules/react-native-thermal-state/windows/RNThermalState.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp- Add
using Thermal.State.RNThermalState;to the usings at the top of the file - Add
new RNThermalStatePackage()to theList<IReactPackage>returned by thePackagesmethod
- Add
import RNThermalState from 'react-native-thermal-state';
// TODO: What to do with the module?
RNThermalState;