1.1.2 • Published 8 years ago

props-proxy-firebase v1.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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

8 years ago

1.1.0

8 years ago

1.0.38

8 years ago

1.0.37

8 years ago

1.0.36

8 years ago

1.0.35

8 years ago

1.0.34

8 years ago

1.0.33

8 years ago

1.0.32

8 years ago

1.0.31

8 years ago

1.0.30

8 years ago

1.0.29

8 years ago

1.0.28

8 years ago

1.0.26

8 years ago

1.0.25

8 years ago

1.0.24

8 years ago

1.0.23

8 years ago

1.0.22

8 years ago

1.0.21

8 years ago

1.0.20

8 years ago

1.0.19

8 years ago

1.0.18

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago