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

Property "_store" not present in production React Elements #25

Closed
chen-ye opened this issue Jun 20, 2018 · 4 comments
Closed

Property "_store" not present in production React Elements #25

chen-ye opened this issue Jun 20, 2018 · 4 comments

Comments

@chen-ye
Copy link
Contributor

chen-ye commented Jun 20, 2018

react_fast_compare checks for the existence of _store in order to verify the compared object is a React element, and avoid react-specific circular references.

However, this property is not created in production environments (as can be seen at https://github.com/facebook/react/blob/master/packages/react/src/ReactElement.js#L126).

As a result, react_fast_compare doesn't omit circular references in production.

@chen-ye
Copy link
Contributor Author

chen-ye commented Jun 20, 2018

(Apologies for formatting, on mobile)

@chrisbolin
Copy link
Contributor

Thank you for reporting this! We'll check it!!!

@chen-ye
Copy link
Contributor Author

chen-ye commented Jun 21, 2018

Here's a reproduction
Works fine in dev environments: https://codesandbox.io/s/nk6rzr7z64
But fails to omit _owner in prod: https://csb-nk6rzr7z64-cfyxlokhrg.now.sh/

@chrisbolin
Copy link
Contributor

fixed with react-fast-compare@2.0.1

🙇 @chen-ye

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

No branches or pull requests

2 participants