Integer ID vs Character ID in redux
<p>I need to be able to reference items by username and slug. I currently have my state shape like this:</p>

<pre><code>posts: {
    user1_postslug: {...},
    user2_postslug1: {...},
}
</code></pre>

<p>But I'm worried that this will eventually affect performance, so I thought about doing it like this instead:</p>

<pre><code>posts: {
    items: {
        4: {...},
        21: {...},
    },
    references: {
        user1_postslug: 21,
        user2_postslug1: 4,
    }
}
</code></pre>

<p>Here I am storing them by their numbered id, and storing references to them. Is there any reason I shouldn't be using the above code, or the first?</p>