-
-
Notifications
You must be signed in to change notification settings - Fork 553
feat(react-native): react-native and boilerplates support #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ackage file for now).
# Conflicts: # src/compose.js
|
|
prescottprue
added a commit
that referenced
this pull request
Mar 24, 2017
**NOTE:** [The original pull request](#81) for this feature and its branch have the `dist` files included in git tracking (so the branch could be referenced in package files). This pull request does not include `dist` files. ## Features * Initial support for `react-native` (should solve #80) * Import only needed sections of Firebase library ( #72 and #53 ) ## Notes About react-native Support for `react-native` is still in the early testing phases. That means the API and/or functionality may change. If using `react-native`, make sure you have the following config enabled when creating your store: ```js import ReactNative from 'react-native' import { compose, createStore } from 'redux'; import { reactReduxFirebase } from 'react-redux-firebase' const firebaseConfig = {} // your firebase config object const initialState = { firebase: { authError: null } }; // then in your config when creating store const store = createStore( makeRootReducer(), initialState, compose( reactReduxFirebase( firebaseConfig, { rn: ReactNative, enableRedirectHandling: false, userProfile: 'users' }, ), ) ); ``` Normal authentication methods, such as `firebase.login({provider: 'google', type: 'popup'})`, will not work due to Firebase's js library (used internally) not completely supporting `react-native`. That means you must use `firebase.auth().signInWithCredential(credential)` until there is more support within the Firebase library. It might look something like this (untested): ```js let credential = this.props.firebase.auth.GoogleAuthProvider.credential(token); this.props.firebase.auth().signInWithCredential(credential) .then(() => { console.log('auth successful') }) .catch((err) => { console.log('error: ', err) }) ```
Tomoya32
added a commit
to Tomoya32/react-redux-firebase
that referenced
this pull request
Aug 22, 2018
**NOTE:** [The original pull request](prescottprue/react-redux-firebase#81) for this feature and its branch have the `dist` files included in git tracking (so the branch could be referenced in package files). This pull request does not include `dist` files. ## Features * Initial support for `react-native` (should solve #80) * Import only needed sections of Firebase library ( #72 and #53 ) ## Notes About react-native Support for `react-native` is still in the early testing phases. That means the API and/or functionality may change. If using `react-native`, make sure you have the following config enabled when creating your store: ```js import ReactNative from 'react-native' import { compose, createStore } from 'redux'; import { reactReduxFirebase } from 'react-redux-firebase' const firebaseConfig = {} // your firebase config object const initialState = { firebase: { authError: null } }; // then in your config when creating store const store = createStore( makeRootReducer(), initialState, compose( reactReduxFirebase( firebaseConfig, { rn: ReactNative, enableRedirectHandling: false, userProfile: 'users' }, ), ) ); ``` Normal authentication methods, such as `firebase.login({provider: 'google', type: 'popup'})`, will not work due to Firebase's js library (used internally) not completely supporting `react-native`. That means you must use `firebase.auth().signInWithCredential(credential)` until there is more support within the Firebase library. It might look something like this (untested): ```js let credential = this.props.firebase.auth.GoogleAuthProvider.credential(token); this.props.firebase.auth().signInWithCredential(credential) .then(() => { console.log('auth successful') }) .catch((err) => { console.log('error: ', err) }) ```
mirdavion
pushed a commit
to mirdavion/react-redux-firebase
that referenced
this pull request
Mar 18, 2021
**NOTE:** [The original pull request](prescottprue/react-redux-firebase#81) for this feature and its branch have the `dist` files included in git tracking (so the branch could be referenced in package files). This pull request does not include `dist` files. ## Features * Initial support for `react-native` (should solve #80) * Import only needed sections of Firebase library ( #72 and #53 ) ## Notes About react-native Support for `react-native` is still in the early testing phases. That means the API and/or functionality may change. If using `react-native`, make sure you have the following config enabled when creating your store: ```js import ReactNative from 'react-native' import { compose, createStore } from 'redux'; import { reactReduxFirebase } from 'react-redux-firebase' const firebaseConfig = {} // your firebase config object const initialState = { firebase: { authError: null } }; // then in your config when creating store const store = createStore( makeRootReducer(), initialState, compose( reactReduxFirebase( firebaseConfig, { rn: ReactNative, enableRedirectHandling: false, userProfile: 'users' }, ), ) ); ``` Normal authentication methods, such as `firebase.login({provider: 'google', type: 'popup'})`, will not work due to Firebase's js library (used internally) not completely supporting `react-native`. That means you must use `firebase.auth().signInWithCredential(credential)` until there is more support within the Firebase library. It might look something like this (untested): ```js let credential = this.props.firebase.auth.GoogleAuthProvider.credential(token); this.props.firebase.auth().signInWithCredential(credential) .then(() => { console.log('auth successful') }) .catch((err) => { console.log('error: ', err) }) ```
prodev90
added a commit
to prodev90/react-redux-firebase-sample
that referenced
this pull request
Jan 4, 2023
**NOTE:** [The original pull request](prescottprue/react-redux-firebase#81) for this feature and its branch have the `dist` files included in git tracking (so the branch could be referenced in package files). This pull request does not include `dist` files. ## Features * Initial support for `react-native` (should solve #80) * Import only needed sections of Firebase library ( #72 and #53 ) ## Notes About react-native Support for `react-native` is still in the early testing phases. That means the API and/or functionality may change. If using `react-native`, make sure you have the following config enabled when creating your store: ```js import ReactNative from 'react-native' import { compose, createStore } from 'redux'; import { reactReduxFirebase } from 'react-redux-firebase' const firebaseConfig = {} // your firebase config object const initialState = { firebase: { authError: null } }; // then in your config when creating store const store = createStore( makeRootReducer(), initialState, compose( reactReduxFirebase( firebaseConfig, { rn: ReactNative, enableRedirectHandling: false, userProfile: 'users' }, ), ) ); ``` Normal authentication methods, such as `firebase.login({provider: 'google', type: 'popup'})`, will not work due to Firebase's js library (used internally) not completely supporting `react-native`. That means you must use `firebase.auth().signInWithCredential(credential)` until there is more support within the Firebase library. It might look something like this (untested): ```js let credential = this.props.firebase.auth.GoogleAuthProvider.credential(token); this.props.firebase.auth().signInWithCredential(credential) .then(() => { console.log('auth successful') }) .catch((err) => { console.log('error: ', err) }) ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
react-native(should solve I.hasOwnProperty("process") #80)Notes About react-native
Support for
react-nativeis still in the early testing phases. That means the API and/or functionality may change.If using
react-native, make sure you have the following config enabled when creating your store:Normal authentication methods, such as
firebase.login({provider: 'google', type: 'popup'}), will not work due to Firebase's js library (used internally) not completely supportingreact-native. That means you must usefirebase.auth().signInWithCredential(credential)until there is more support within the Firebase library.It might look something like this (untested):