Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codewithreelofficial/toast
Bunlong :rocket: The First React Native Modules Development :tada:
https://github.com/codewithreelofficial/toast
android android-app ios javascript mobile react react-native reactjs
Last synced: about 2 months ago
JSON representation
Bunlong :rocket: The First React Native Modules Development :tada:
- Host: GitHub
- URL: https://github.com/codewithreelofficial/toast
- Owner: codewithreelofficial
- Created: 2018-10-16T04:03:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T08:04:31.000Z (over 6 years ago)
- Last Synced: 2024-11-03T21:06:35.150Z (3 months ago)
- Topics: android, android-app, ios, javascript, mobile, react, react-native, reactjs
- Language: C#
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-toast
## Getting started
`$ npm install react-native-toast --save`
### Mostly automatic installation
`$ react-native link react-native-toast`
### Manual installation
#### 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-toast` and add `RNToast.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNToast.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<#### Android
1. Open up `android/app/src/main/java/[...]/MainApplication.java`
- Add `import com.reactlibrary.RNToastPackage;` to the imports at the top of the file
- Add `new RNToastPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-toast'
project(':react-native-toast').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-toast/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-toast')
```#### Windows
[Read it! :D](https://github.com/ReactWindows/react-native)1. In Visual Studio add the `RNToast.sln` in `node_modules/react-native-toast/windows/RNToast.sln` folder to their solution, reference from their app.
2. Open up your `MainPage.cs` app
- Add `using Toast.RNToast;` to the usings at the top of the file
- Add `new RNToastPackage()` to the `List` returned by the `Packages` method## Usage
```javascript
import RNToast from 'react-native-toast';// TODO: What to do with the module?
RNToast;
```