[docs] added misc new doc files plus related todo's

This commit is contained in:
Salakar 2017-08-26 06:48:26 +01:00
parent 99d79b2ef8
commit 691938963a
9 changed files with 31 additions and 28 deletions

View File

@ -26,7 +26,7 @@ console.log("storageBucket", defaultApp.options.projectId);
```
TODO api ref docs:
<!-- TODO api ref docs: -->
- name: String
- options: Object

View File

@ -0,0 +1,4 @@
<!-- TODO -->
### Enable Database Persistence

View File

@ -0,0 +1,5 @@
<!-- TODO -->
### Log Options
### Debug Options

View File

@ -1,10 +1,9 @@
# Firebase
TODO api ref docs:
- apps(): Array<FirebaseApp>
- app(): FirebaseApp
- initializeApp(): FirebaseApp
- setLogLevel()
- SDK_VERSION: String
- googleApiAvailability: Object
<!-- TODO api ref docs -->
<!-- TODO - apps(): Array<FirebaseApp> -->
<!-- TODO - app(): FirebaseApp -->
<!-- TODO - initializeApp(): FirebaseApp -->
<!-- TODO - setLogLevel() -->
<!-- TODO - SDK_VERSION: String -->
<!-- TODO - googleApiAvailability: Object -->

View File

@ -2,12 +2,7 @@
## Usage with Expo
If you use Expo and would like to use this package, you'll need to eject. If you do not want to eject, but wish to make use of features
such as Realtime Database (without offline support) & Authentication, you can still use the Firebase Web SDK in your project.
For features such a Crash Reporting, Push Notifications (via Firebase not Expo), Performance Monitoring, AdMob, Analytics, Storage & Remote Config, you will have to eject your Expo project as these require the native SDKs, as the Web SDK does not support these.
You can see an indepth conversation [here](https://expo.canny.io/feature-requests/p/full-native-firebase-integration).
See [usage with expo](/faq/expo).
## Comparison to Firestack

View File

@ -2,7 +2,7 @@
## From v2 to v3
TODO
<!-- TODO -->
## From v1 to v2

View File

@ -81,7 +81,7 @@ const unsubscribe = firebase.storage()
});
```
## TODO
<!-- TODO -->
There are a few methods which have not yet been implemented for Storage:

View File

@ -4,7 +4,7 @@
### Android Implementation
The [android implementation](https://github.com/invertase/react-native-firebase/blob/master/android/src/main/java/io/invertase/firebase/database/RNFirebaseTransactionHandler.java) makes use of [Condition](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html) and [ReentrantLock](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantLock.html) locks to handle transactions across the React Native Bridge.
The [android implementation](https://github.com/invertase/react-native-firebase/blob/master/android/src/main/java/io/invertase/firebase/database/RNFirebaseTransactionHandler.java) makes use of [Condition](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html) and [ReentrantLock](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantLock.html) locks to handle transactions across the React Native Bridge.
### iOS Implementation
@ -13,7 +13,6 @@ The [iOS implementation](https://github.com/invertase/react-native-firebase/blob
!> Transactions that receive no response from react native's JS thread within 30 seconds are automatically aborted - this value is currently not configurable - PR welcome.
## Example
```javascript

View File

@ -1,8 +1,9 @@
# Usage with Redux
Although RNFirebase usage requires a React Native environment, it isn't tightly coupled which allows for full flexibility
when it comes to integrating with other modules such a [`react-redux`](https://github.com/reactjs/react-redux). If you wish to use
a Redux library designed for Firebase, we suggest taking a look at [`react-redux-firebase`](http://docs.react-redux-firebase.com/history/v2.0.0/docs/recipes/react-native.html)
when it comes to integrating with other modules such a [`react-redux`](https://github.com/reactjs/react-redux).
If you wish to use a Redux library designed for Firebase, we suggest taking a look at [`react-redux-firebase`](http://docs.react-redux-firebase.com/history/v2.0.0/docs/recipes/react-native.html)
for implementation with this module.
## Standalone integration
@ -21,14 +22,14 @@ export const subscribe = () => {
return (dispatch) => {
firebase.database().ref('todos').on('value', (snapshot) => {
const todos = [];
snapshot.forEach((childSnapshot) => {
todos.push({
id: childSnapshot.key,
...(childSnapshot.val()),
})
})
dispatch({
type: 'TODO_UPDATE',
todos,
@ -67,7 +68,7 @@ const todos = (state = {}, action) => {
case 'TODO_UPDATE':
return { ...action.todos };
}
return state;
}
@ -92,20 +93,20 @@ class Todos extends React.Component {
subscribe()
);
}
onComplete = (id) => {
this.props.dispatch(
completeTodo(id)
);
};
onAdd = (text) => {
this.props.dispatch(
addTodo(text)
);
};
render() {
render() {
return (
<FlatList
data={this.props.todos}