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

Fix issue with isValidElementType invariant check crashing on valid t… #1122

Merged
merged 1 commit into from Dec 13, 2018

Conversation

Andarist
Copy link
Contributor

…ype with circular structure

Repro - https://codesandbox.io/s/jnmoxr5mk3

Emotion is attaching created component to the returned styled component (creating a circular structure) to easily "flatten" subsequent calls wrapping that component, as in:

const Div = styled.div`color: white;`
const Div2 = styled(Div)`background-color: pink;`

@netlify
Copy link

netlify bot commented Dec 12, 2018

Deploy preview for react-redux-docs ready!

Built with commit 8d3af26

https://deploy-preview-1122--react-redux-docs.netlify.com

@timdorr
Copy link
Member

timdorr commented Dec 12, 2018

Can you run this through Prettier? And can you add a test?

@@ -27,4 +27,7 @@ if (version.toLowerCase() === 'all') {
}
}

npmRun.execSync(`jest -c '${JSON.stringify(jestConfig)}'`, { stdio: 'inherit' })
npmRun.execSync(
`jest -c '${JSON.stringify(jestConfig)}' ${process.argv.slice(2).join(' ')}`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this has actually allowed me to use --watch (which is still not ideal because we have to edit copy of tests rather than real test files to benefit from that, but better this now than nothing)

@@ -42,12 +42,12 @@ npm run test

To run in explicit React versions (the number is the version, so `test:16.3` will run in React version `16.3`):
```
REACT=16.4 npm run test:ci
REACT=16.4 npm run test
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no test:ci script

@Andarist
Copy link
Contributor Author

Can you run this through Prettier? And can you add a test?

Done & done.

@timdorr
Copy link
Member

timdorr commented Dec 13, 2018

Thanks for this and the other updates!

@timdorr timdorr merged commit 595ae8f into reduxjs:master Dec 13, 2018
@Andarist Andarist deleted the fix/invariant-circular-type branch December 13, 2018 17:10
webguru7 pushed a commit to webguru7/react-redux that referenced this pull request Dec 8, 2022
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.

None yet

2 participants