Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenn-CodeCrew authored Apr 17, 2019
1 parent 815257e commit 9a277c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ book: [{

- You can get rid of the mounting warning with this article: https://www.robinwieruch.de/react-warning-cant-call-setstate-on-an-unmounted-component/

- You can add a unique ID to your messages when you push them to the server
```
// At the top, bring in the ObjectID object
var ObjectID = require('mongodb').ObjectID;
// Then use the _id key and the new ObjectID() function when you push
{$push: {todos: {_id: new ObjectID(), todo: req.body.todoItem}}}
```


### SMALL OFFSET CHALLENGE
Expand Down

0 comments on commit 9a277c1

Please sign in to comment.