This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dotprop from 'dot-prop-immutable'; | |
import { | |
UPDATE_POST_TITLE, | |
LOAD_APP | |
} from './../constants/actionTypes'; | |
export default (state = {}, action) => { | |
switch (action.type) { | |
case LOAD_APP: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import './App.css'; | |
import State from './State'; | |
import Posts from './components/Posts'; | |
import { LOAD_APP } from './constants/actionTypes'; | |
import { connect } from 'react-redux'; | |
const mapDispatchToProps = dispatch => ({ | |
onLoad: (payload) => { | |
dispatch({ type: LOAD_APP, payload }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux'; | |
import { | |
UPDATE_POST_TITLE | |
} from './../constants/actionTypes'; | |
const mapDispatchToProps = dispatch => ({ | |
updatePostTitle: (payload) => | |
dispatch({ type: UPDATE_POST_TITLE, payload }) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux'; | |
import { | |
UPDATE_POST_TITLE | |
} from './../constants/actionTypes'; | |
const mapDispatchToProps = dispatch => ({ | |
updatePostTitle: (payload) => | |
dispatch({ type: UPDATE_POST_TITLE, payload }) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import ReactDOM from "react-dom"; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
loading: true | |
}; | |
} |