Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context update doesn't fully propagate in some cases #12246

Closed
gaearon opened this issue Feb 18, 2018 · 5 comments
Closed

Context update doesn't fully propagate in some cases #12246

gaearon opened this issue Feb 18, 2018 · 5 comments
Assignees

Comments

@gaearon
Copy link
Collaborator

gaearon commented Feb 18, 2018

I think there may be a bug in context in the latest alpha. When some updates are scheduled in the commit phase, it doesn't seem to propagate.

git clone https://github.com/gaearon/emoji-search.git
cd emoji-search
yarn
yarn start

Enter "mon". Erase it. Click on "dark mode".
Expected: all children update. Actual: some children don't update.

This only seems to happen with this indirection.

gif

@AlexanderKositsyn
Copy link

@gaearon I solved this bug for particular task by changing the 'key' props for each EmojiResultRow item from title to index. This is bad decision. But the bug maybe in Provider reconciliation.
New code from EmojiResults

class EmojiResults extends PureComponent {
  render() {
    return (
      <div className="component-emoji-results">
        {this.props.emojiData.map((emojiData, index) => (
          <EmojiResultRow
            key={index}
            symbol={emojiData.symbol}
            title={emojiData.title}
          />
        ))}
      </div>
    );
  }
}

@acdlite
Copy link
Collaborator

acdlite commented Feb 23, 2018

@gaearon @AlexanderKositsyn I know what the bug is. On my todo list :)

@acdlite acdlite closed this as completed Mar 29, 2018
@acdlite
Copy link
Collaborator

acdlite commented Mar 29, 2018

Fixed by #12478

@gaearon
Copy link
Collaborator Author

gaearon commented Mar 29, 2018

@acdlite Wrong link?

@acdlite
Copy link
Collaborator

acdlite commented Mar 29, 2018

Oops, sorry. Meant #12254.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants