Skip to content

Feature: Firebase setup#10

Open
Luffi2539 wants to merge 10 commits intomasterfrom
firebase-setup
Open

Feature: Firebase setup#10
Luffi2539 wants to merge 10 commits intomasterfrom
firebase-setup

Conversation

@Luffi2539
Copy link
Copy Markdown
Collaborator

Initial Firebase setup with redux-saga-firebase library

@Luffi2539 Luffi2539 requested a review from edvardsk April 11, 2019 14:54
Comment thread frontend-redux/src/config/fbConfig.js Outdated
// Initialize Firebase
// Insert your credentials
export const config = {
apiKey: 'AIzaSyBPUuIONtxcQ3efdGpMGbJVEn6fUG_1E5g',
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to env
apiKey: process.env.FIREBASE_API_KEY


export function* addFirebaseDataSaga({ payload }) {
if (payload.name && payload.age) {
yield call(rsf.firestore.addDocument, 'user', payload);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each action should dispatch start, end or error

export default (history) => combineReducers({
form: formReducer,

firebase: firebaseReducer,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check immutable

testSelector,
mapDispatchToProps,
),
firestoreConnect([
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to get firestore collection/element into selector/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants