Update AJAXRedux.md

master
Matt Huntington 8 years ago committed by GitHub
parent 0a6e6a66df
commit 5e70bf8bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -54,12 +54,12 @@ fetch('https://stupidcomments.herokuapp.com/comments').then((response)=>{
## Dispatch an ADD action appropriately
In `js/components/commentsform.jsx` alter the `handleSubmit` property to make an AJAX POST request:
In `js/components/commentsform.jsx` alter the `createComment` property to make an AJAX POST request:
```javascript
const mapDispatchToProps = function(dispatch){
return {
handleSubmit: function(comment){
createComment: function(comment){
fetch(
'https://stupidcomments.herokuapp.com/comments',
{

Loading…
Cancel
Save