Skip to content

Commit 3aa82e8

Browse files
author
Nicolas Garnier
committed
Release v1.1.8
1 parent ff3b6ed commit 3aa82e8

10 files changed

+29
-17
lines changed

dist/FirebaseAuth.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/FirebaseAuth.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/README.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ In your app:
2828
4. Use the `FirebaseAuth` component in your template passing it the **Firebase UI configuration** and a **Firebase Auth instance**.
2929

3030

31-
### `FirebaseAuth` vs `StyledFirebaseAuth`
31+
### `FirebaseAuth` vs. `StyledFirebaseAuth`
3232

33-
There are two components that allow you to add FirebaseUI auth to your application: `FirebaseAuth` and `StyledFirebaseAuth`. The difference is that `FirebaseAuth` has a reference to the Firebase UI CSS (it `requires` the CSS) whereas `StyledFirebaseAuth` includes the CSS directly in its built. For simplicity you should use `StyledFirebaseAuth` and for better performances and build sizes you should use `FirebaseAuth`. `FirebaseAuth` is meant to be used with a CSS/style loader as part of yor webpack built configuration. See the [Packing your app](#packing-your-app) section
33+
There are two similar components that allow you to add FirebaseUI auth to your application: `FirebaseAuth` and `StyledFirebaseAuth`.
34+
- `FirebaseAuth` has a reference to the FirebaseUI CSS file (it `requires` the CSS).
35+
- `StyledFirebaseAuth` is bundled with the CSS directly.
36+
37+
For simplicity you should use `StyledFirebaseAuth` and for potential better performances and build sizes you can use `FirebaseAuth`. `FirebaseAuth` is meant to be used with a CSS/style loader as part of yor webpack built configuration. See the [Packing your app](#packing-your-app) section.
3438

3539

3640
### Using `StyledFirebaseAuth` with a redirect
@@ -97,6 +101,7 @@ firebase.initializeApp(config);
97101

98102
class SignInScreen extends React.Component {
99103

104+
// The component's Local state.
100105
state = {
101106
signedIn: false // Local signed-in state.
102107
};
@@ -110,17 +115,17 @@ class SignInScreen extends React.Component {
110115
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
111116
firebase.auth.FacebookAuthProvider.PROVIDER_ID
112117
],
113-
// Avoid redirects after sign-in.
114118
callbacks: {
119+
// Avoid redirects after sign-in.
115120
signInSuccess: () => false
116121
}
117122
};
118123

119124
// Listen to the Firebase Auth state and set the local state.
120125
componentWillMount() {
121-
firebase.auth().onAuthStateChanged((user) => {
122-
this.setState({signedIn: !!user});
123-
});
126+
firebase.auth().onAuthStateChanged(
127+
(user) => this.setState({signedIn: !!user})
128+
);
124129
}
125130

126131
render() {
@@ -271,6 +276,13 @@ If you would like to see an example of styling, have a look at the [example app]
271276
Alternatively you can include the styling in a `<style>` tag in your application's markup.
272277

273278

279+
## Server-Side Rendering (SSR)
280+
281+
FirebaseUI React cannot be rendered on the serverside becasue the underlying, wrapped library ([FirebaseUI](https://npmjs.com/package/firebaseui) does not work server-side.
282+
283+
You may still import and include the library in an app that uses SSR: there should be no errors but no elements will be rendered.
284+
285+
274286
## Contributing
275287

276288
We'd love that you contribute to the project. Before doing so please read our [Contributor guide](CONTRIBUTING.md).

dist/StyledFirebaseAuth.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/StyledFirebaseAuth.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-firebaseui",
3-
"version": "1.1.7",
3+
"version": "1.1.8",
44
"description": "React wrapper for firebaseui: Javascript library for customizable UI on top of Firebase SDK",
55
"files": [
66
"FirebaseAuth.js",

example/package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"firebaseui": "^2.6.0",
1111
"react": "15.6.1",
1212
"react-dom": "15.6.1",
13-
"react-firebaseui": "^1.1.7"
13+
"react-firebaseui": "^1.1.8"
1414
},
1515
"devDependencies": {
1616
"babel-cli": "6.24.1",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-firebaseui",
3-
"version": "1.1.7",
3+
"version": "1.1.8",
44
"description": "React wrapper for firebaseui: Javascript library for customizable UI on top of Firebase SDK",
55
"files": [
66
"FirebaseAuth.js",

0 commit comments

Comments
 (0)