From 691938963a72bce41f71e2e0fdee77aa9d7f2931 Mon Sep 17 00:00:00 2001 From: Salakar Date: Sat, 26 Aug 2017 06:48:26 +0100 Subject: [PATCH] [docs] added misc new doc files plus related todo's --- docs/core/app.md | 2 +- docs/core/config-default-app.md | 4 ++++ docs/core/config-rnfirebase.md | 5 +++++ docs/core/firebase.md | 15 +++++++-------- docs/faqs.md | 7 +------ docs/migration-guide.md | 2 +- docs/modules/storage.md | 2 +- docs/modules/transactions.md | 3 +-- docs/redux.md | 19 ++++++++++--------- 9 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 docs/core/config-default-app.md create mode 100644 docs/core/config-rnfirebase.md diff --git a/docs/core/app.md b/docs/core/app.md index 5d341e24..54bdb266 100644 --- a/docs/core/app.md +++ b/docs/core/app.md @@ -26,7 +26,7 @@ console.log("storageBucket", defaultApp.options.projectId); ``` -TODO api ref docs: + - name: String - options: Object diff --git a/docs/core/config-default-app.md b/docs/core/config-default-app.md new file mode 100644 index 00000000..91a51536 --- /dev/null +++ b/docs/core/config-default-app.md @@ -0,0 +1,4 @@ + + +### Enable Database Persistence + diff --git a/docs/core/config-rnfirebase.md b/docs/core/config-rnfirebase.md new file mode 100644 index 00000000..b18a4228 --- /dev/null +++ b/docs/core/config-rnfirebase.md @@ -0,0 +1,5 @@ + +### Log Options + +### Debug Options + diff --git a/docs/core/firebase.md b/docs/core/firebase.md index 43cd33e8..c203c11f 100644 --- a/docs/core/firebase.md +++ b/docs/core/firebase.md @@ -1,10 +1,9 @@ # Firebase -TODO api ref docs: - - - apps(): Array - - app(): FirebaseApp - - initializeApp(): FirebaseApp - - setLogLevel() - - SDK_VERSION: String - - googleApiAvailability: Object + + + + + + + diff --git a/docs/faqs.md b/docs/faqs.md index ec9a1dfd..669f9293 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -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 diff --git a/docs/migration-guide.md b/docs/migration-guide.md index 2b912ec3..107f5e23 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -2,7 +2,7 @@ ## From v2 to v3 -TODO + ## From v1 to v2 diff --git a/docs/modules/storage.md b/docs/modules/storage.md index 757008af..ff685af9 100644 --- a/docs/modules/storage.md +++ b/docs/modules/storage.md @@ -81,7 +81,7 @@ const unsubscribe = firebase.storage() }); ``` -## TODO + There are a few methods which have not yet been implemented for Storage: diff --git a/docs/modules/transactions.md b/docs/modules/transactions.md index 261df995..e3ec0011 100644 --- a/docs/modules/transactions.md +++ b/docs/modules/transactions.md @@ -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 diff --git a/docs/redux.md b/docs/redux.md index 818b4127..9ac6df57 100644 --- a/docs/redux.md +++ b/docs/redux.md @@ -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 (