Skip to content

Conversation

coleturner
Copy link
Contributor

@coleturner coleturner commented Apr 24, 2017

When I saw this example I was initially excited by the prospect of storing state between connectAdvanced calls.

I thought of the uses like storing the deleted todo items, or even just the count. But then it dawned on me that the idiomatic approach to Redux, such as the ability for time travel - is challenged when the previous state is stored. For example if I stored deletedTodoCount and then used time travel this figure would be wrong because the previous state would be from the future.

For newbies like myself, suggesting this in documentation can be misleading and might encourage the wrong practice of depending on the difference between states for props when really should come from the store.

When I saw this example I was initially excited by the prospect of storing `state` between `connectAdvanced` calls.

I thought of the uses like storing the deleted todo items, or even just the count. But then it dawned on me that the idiomatic approach to Redux, such as the ability for time travel - is challenged when the previous state is stored.

For newbies like myself, suggesting this in documentation can be misleading and might encourage the wrong practice.
@timdorr
Copy link
Member

timdorr commented Apr 24, 2017

Well, it's not used there anyways, so that's OK to remove. Thanks!

@timdorr timdorr merged commit 73e5d2c into reduxjs:master Apr 24, 2017
josepot pushed a commit to josepot/react-redux-lean that referenced this pull request Sep 21, 2018
When I saw this example I was initially excited by the prospect of storing `state` between `connectAdvanced` calls.

I thought of the uses like storing the deleted todo items, or even just the count. But then it dawned on me that the idiomatic approach to Redux, such as the ability for time travel - is challenged when the previous state is stored.

For newbies like myself, suggesting this in documentation can be misleading and might encourage the wrong practice.
albertodev7 pushed a commit to albertodev7/react-redux that referenced this pull request Dec 8, 2022
When I saw this example I was initially excited by the prospect of storing `state` between `connectAdvanced` calls.

I thought of the uses like storing the deleted todo items, or even just the count. But then it dawned on me that the idiomatic approach to Redux, such as the ability for time travel - is challenged when the previous state is stored.

For newbies like myself, suggesting this in documentation can be misleading and might encourage the wrong practice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants