[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 - name: String
- options: Object - 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 # Firebase
TODO api ref docs: <!-- TODO api ref docs -->
<!-- TODO - apps(): Array<FirebaseApp> -->
- apps(): Array<FirebaseApp> <!-- TODO - app(): FirebaseApp -->
- app(): FirebaseApp <!-- TODO - initializeApp(): FirebaseApp -->
- initializeApp(): FirebaseApp <!-- TODO - setLogLevel() -->
- setLogLevel() <!-- TODO - SDK_VERSION: String -->
- SDK_VERSION: String <!-- TODO - googleApiAvailability: Object -->
- googleApiAvailability: Object

View File

@ -2,12 +2,7 @@
## Usage with Expo ## 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 See [usage with expo](/faq/expo).
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).
## Comparison to Firestack ## Comparison to Firestack

View File

@ -2,7 +2,7 @@
## From v2 to v3 ## From v2 to v3
TODO <!-- TODO -->
## From v1 to v2 ## 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: There are a few methods which have not yet been implemented for Storage:

View File

@ -4,7 +4,7 @@
### Android Implementation ### 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 ### 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. !> 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 ## Example
```javascript ```javascript

View File

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