1.1.2 • Published 7 years ago
props-proxy-firebase v1.1.2
Firebase props render for REACT
A props proxy for firebase
I recently use firebase in a small project and I feel the need to implement a simple props proxy for Firebase
Test
Test are comming soon
Usage
npm install --save props-proxy-firebase
or
yarn add props-proxy-firebase
Create a specific file at the root of your project firebase.config.js
like so
module.exports = {
"apiKey": "MY_FIREBASE_API_KEY",
"authDomain": "MY_FIREBASE_AUTH_DOMAIN",
"databaseURL": "MY_FIREBASE_DATABASE_URL",
"projectId": "MY_FIREBASE_PROJECT_ID"
}
Then for your components:
import firebaseHOC from 'props-proxy-firebase';
const Login = ({ firebase }) => {
return (
<div className="layoutDefault">
<buttton onclick={e => {
e.preventDefault();
const provider = new firebase.auth.GoogleAuthProvider();
firebase
.auth()
.signInWithPopup(provider)
.catch(error => {
console.error(error);
});
}}>Google</button>
</div>
)
}
export default firebaseHOC(Login);
1.1.2
7 years ago
1.1.0
7 years ago
1.0.38
7 years ago
1.0.37
7 years ago
1.0.36
7 years ago
1.0.35
7 years ago
1.0.34
7 years ago
1.0.33
7 years ago
1.0.32
7 years ago
1.0.31
7 years ago
1.0.30
7 years ago
1.0.29
7 years ago
1.0.28
7 years ago
1.0.26
7 years ago
1.0.25
7 years ago
1.0.24
7 years ago
1.0.23
7 years ago
1.0.22
7 years ago
1.0.21
7 years ago
1.0.20
7 years ago
1.0.19
7 years ago
1.0.18
7 years ago
1.0.17
7 years ago
1.0.16
7 years ago
1.0.15
7 years ago
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
7 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago