-
Notifications
You must be signed in to change notification settings - Fork 1
Using reducers
Sstobo edited this page Mar 20, 2018
·
5 revisions
import { getUser } from "../../redux/modules/userReducer";
import { getCompany } from "../../redux/modules/companyReducer";
import { getCompanyProjects } from "../../redux/modules/companyReducer";
import { getCompanyQuestions } from "../../redux/modules/companyReducer";
componentDidMount() {
this.props.dispatch(getUser("WJTvKQHAwP9frwE46woO"));
this.props.dispatch(getCompany("IxTyhQSllwOPTG0u3qCF"));
this.props.dispatch(getCompanyProjects("IxTyhQSllwOPTG0u3qCF", "project1"));
componentDidMount() { this.props.dispatch(getCompanyQuestions("adobe", "photoshop")); } }
User Guide: All functions take an ID. This is the hash generated by firebase.
The getProjects function takes a 'project number' ie: project1, project2 ect.
The getQuestions function takes a project number and a question number ie: question1, question2 ect