Skip to content

Fixed an issue with React giving warning about static children not having unique keys when using classic jsx factory - #2066

Merged
Andarist merged 1 commit into
masterfrom
fix/create-element-static-children-key-warn
Nov 2, 2020
Merged

Fixed an issue with React giving warning about static children not having unique keys when using classic jsx factory#2066
Andarist merged 1 commit into
masterfrom
fix/create-element-static-children-key-warn

Conversation

@Andarist

@Andarist Andarist commented Nov 2, 2020

Copy link
Copy Markdown
Member

fixes #2065

…ving unique keys when using classic `jsx` factory
@Andarist
Andarist requested a review from emmatown November 2, 2020 09:38
@changeset-bot

changeset-bot Bot commented Nov 2, 2020

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6d539e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@emotion/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/core/src/jsx.js
createElementArgArray[0] = Emotion
createElementArgArray[1] = createEmotionProps(type, props)

// https://github.com/facebook/react/blob/fd61f7ea53989a59bc427603798bb111c852816a/packages/react/src/ReactElement.js#L386-L400

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda not sure why I have changed this logic to replicate what React is doing under the hood. I've implemented support for those new runtimes and refactor to the classic jsx a few months back, so 🤷‍♂️

@Andarist

Andarist commented Nov 2, 2020

Copy link
Copy Markdown
Member Author

@mitchellhamilton merging this as its sort of a hotfix

@Andarist
Andarist merged commit fe30cbd into master Nov 2, 2020
@Andarist
Andarist deleted the fix/create-element-static-children-key-warn branch November 2, 2020 09:49
@github-actions github-actions Bot mentioned this pull request Nov 2, 2020
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.

10.1.0 jsx implementation causes key errors

1 participant