Update User copy in readme to a real-world example

Summary:
Copy changes. Can proof them here: https://github.com/Instagram/IGListKit/tree/readme

I got some feedback that the `User` example didn't make sense (*why would you have two users with the same pk?*).

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/50

Reviewed By: jessesquires

Differential Revision: D4006618

Pulled By: rnystrom

fbshipit-source-id: 9673788b643785d223b67ab1b23315edfc5874cb
This commit is contained in:
Ryan Nystrom 2016-10-11 19:38:05 -07:00 committed by Facebook Github Bot
parent a2e0005357
commit 6e3656449f

View file

@ -120,10 +120,15 @@ class User {
The user's `primaryKey` uniquely identifies user data, and the `name` is just the value for that user.
Consider the following two users:
Let's say a server returns a `User` object that looks like this:
```swift
let shayne = User(primaryKey: 2, name: "Shayne")
```
But sometime after the client receives `shayne`, someone changes their name:
```swift
let ann = User(primaryKey: 2, name: "Ann")
```