diff --git a/README.md b/README.md index 4fb60f326d673d4a149aca8628c917f1402a74ef..95694a93bb951de0846ec777cb6cf11da733e7de 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ and I recommend you investigate those thoroughly before using this library. ## Getting started -`$ npm install react-native-thread --save` +`$ npm install react-native-threads --save` ### Mostly automatic installation -`$ react-native link react-native-thread` +`$ react-native link react-native-threads` ### Android @@ -46,7 +46,7 @@ like this: #### iOS 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` -2. Go to `node_modules` ➜ `react-native-thread` and add `RNThread.xcodeproj` +2. Go to `node_modules` ➜ `react-native-threads` and add `RNThread.xcodeproj` 3. In XCode, in the project navigator, select your project. Add `libRNThread.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 4. Run your project (`Cmd+R`)< @@ -63,12 +63,12 @@ like this: 2. Append the following lines to `android/settings.gradle`: ``` - include ':react-native-thread' - project(':react-native-thread').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thread/android') + include ':react-native-threads' + project(':react-native-threads').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-threads/android') ``` 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: ``` - compile project(':react-native-thread') + compile project(':react-native-threads') ``` #### Windows @@ -76,7 +76,7 @@ Windows support is not yet implemented, but PRs are welcome if you want to give [Read it! :D](https://github.com/ReactWindows/react-native) -1. In Visual Studio add the `RNThread.sln` in `node_modules/react-native-thread/windows/RNThread.sln` folder to their solution, reference from their app. +1. In Visual Studio add the `RNThread.sln` in `node_modules/react-native-threads/windows/RNThread.sln` folder to their solution, reference from their app. 2. Open up your `MainPage.cs` app - Add `using Thread.RNThread;` to the usings at the top of the file - Add `new RNThreadPackage()` to the `List` returned by the `Packages` method @@ -114,7 +114,7 @@ self.onmessage = (message) => { self.postMessage('hello'); ``` -Check out the examples directory in this repo for demos of using `react-native-thread` +Check out the examples directory in this repo for demos of using `react-native-threads` in a functioning app! ### Thread Lifecycle diff --git a/example/ThreadExample/index.android.js b/example/ThreadExample/index.android.js index 48990e1951eb5405b0593fea09021f59cf5becfb..eced1f6be51f06b7b7ea9c1b84b7a343014e28a6 100644 --- a/example/ThreadExample/index.android.js +++ b/example/ThreadExample/index.android.js @@ -7,7 +7,7 @@ import { TouchableOpacity, } from 'react-native'; -import { Thread } from 'react-native-thread'; +import { Thread } from 'react-native-threads'; class ThreadExample extends Component { componentDidMount() { diff --git a/example/ThreadExample/index.ios.js b/example/ThreadExample/index.ios.js index 51cf77146db9dad7be7c9c083bb9017e5de5872d..c738036bf61682b7ca9086497ca954e49bd8f70c 100644 --- a/example/ThreadExample/index.ios.js +++ b/example/ThreadExample/index.ios.js @@ -7,7 +7,7 @@ import { TouchableOpacity, } from 'react-native'; -import { Thread } from 'react-native-thread'; +import { Thread } from 'react-native-threads'; class ThreadExample extends Component { componentDidMount() { diff --git a/example/ThreadExample/package.json b/example/ThreadExample/package.json index f345ce320c19e71b8b5b0509b370b45b479580a2..316c4d9eccdd1cd649206aa87954c5537fbaef19 100644 --- a/example/ThreadExample/package.json +++ b/example/ThreadExample/package.json @@ -9,7 +9,7 @@ "dependencies": { "react": "16.0.0-alpha.12", "react-native": "0.48.3", - "react-native-thread": "file:../../" + "react-native-threads": "file:../../" }, "devDependencies": { "babel-jest": "21.0.2", diff --git a/example/ThreadExample/worker.js b/example/ThreadExample/worker.js index 5ca1688ac7f2179388f1e61d34a706aaa65fc180..5256a72dfd7b0e343c400805f98d69e391cb076a 100644 --- a/example/ThreadExample/worker.js +++ b/example/ThreadExample/worker.js @@ -1,4 +1,4 @@ -import { self } from 'react-native-thread'; +import { self } from 'react-native-threads'; /* * Web Worker