React-native-firebase: Any plan to support FirebaseUI?

Created on 9 May 2017  路  9Comments  路  Source: invertase/react-native-firebase

Most helpful comment

I am interested in FirebaseUI so that I can use Phone Auth without writing logic to detect current country code and providing a picker for it, and writing validation logic and UI for the verification code. Kindly consider this use case. (cc: @Ehesp)

All 9 comments

Hey, we've not really looked at this before. Generally I'm not sure what benefit it would provide - With RN it makes it simple to pull in and display an image?

Are you looking for something like the below to be possible?

import { Image } from 'react-native-firebase';

...

render() {
  return <Image ref="some/storage/ref" />
}

^ Would be awesome !

I'm really not sure there's any point in using a native module for this. RNFirebase exposes the methods needed to handle this, you could quickly make a custom image component:

import React from 'react';
import { Image } from 'react-native';

export default class extends React.Component {
  static propTypes = {
    ref: React.PropTypes.string.isRequired,
  }

  constructor() {
    super();
    this.state = {
      downloadUrl: '',
    };
  }

  componentDidMount() {
    firebase.storage().ref(this.props.ref)
      .getDownloadURL()
      .then((downloadUrl) => this.setState({ downloadUrl });
  }

  render() {
    if (!this.state.downloadUrl) return null; // or placeholder

    return (
      <Image
        source={{ uri: this.props.downloadUrl }}
        {...this.props}
      />
    );
  }
}

You're right, I don't see this component as part of RNFirebase, but it's a good idea for a separate plugin !

Out of the scope of this project I think. Maybe something to look into in the future once the core API is stable.

@vincent0225, @Ehesp @Colmea

Hello, we wrote a small wrapper (only supports images for now) on top of FirebaseUI:
https://github.com/rmrs/react-native-firebaseui

This is our first attempt of writing React Native UI components (the library is still considered alpha), but we've been running with it for two weeks and it made our application(s) much faster.

I am interested in FirebaseUI so that I can use Phone Auth without writing logic to detect current country code and providing a picker for it, and writing validation logic and UI for the verification code. Kindly consider this use case. (cc: @Ehesp)

It would be great if we could use FirebaseUI for auth

Indeed, provide an interface would be great !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elledienne picture elledienne  路  55Comments

neverlan picture neverlan  路  47Comments

jasan-s picture jasan-s  路  137Comments

gilbert picture gilbert  路  65Comments

umang-simform picture umang-simform  路  77Comments