README Improvements:
- Why?
- Setup
- How? The history of how I ended here...
- Please, read the docs. The oficials! -- before, 3 package.jsons, after, 1...
- The NODE version
- NEXT-ROUTES
- Add the license badge:
- Link the tutorials: Next.js on Cloud Functions for Firebase with Firebase Hosting and Next-routes with Firebase Hosting on Cloud Functions
- Related projects:
Design:
- Apply design from some (a lot of) commits ago 😉
- Implement a great design 🏁
Code:
- Add
WithFirebase
integration, use code must look like this:
export default class HeaderButtons extends Component {
render() {
return (
<WithFirebaseProvider firebaseConfig={firebaseConfig}>
<WithRouter>
{router => (
<WithFirebase>
{({ auth: { authUser, simpleAuth } }) => {
const btnText = authUser ? "Sign Out" : "Sign In";
const btnOnClick = authUser
? () => simpleAuth.signOut()
: () => router.pushRoute('signIn');
return <HeaderButton onClick={btnOnClick}>{btnText}</HeaderButton>;
}}
</WithFirebase>
)}
</WithRouter>
</WithFirebaseProvider>
);
}
}