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

react 16: shallow: SFCs do not get a this #1703

Merged
merged 1 commit into from
Jul 5, 2018
Merged

react 16: shallow: SFCs do not get a this #1703

merged 1 commit into from
Jul 5, 2018

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented Jul 3, 2018

This works around a bug in react-test-renderer: facebook/react#13141

This seems to only be an issue in react 16, and only when using shallow.

In the future, when that bugfix is published, i'll remove this fix and bump the minimum required version.

@ljharb ljharb merged commit e0bcdf7 into master Jul 5, 2018
@ljharb ljharb deleted the sfc_this branch July 5, 2018 21:02
@ljharb ljharb restored the sfc_this branch July 5, 2018 21:27
@ljharb ljharb deleted the sfc_this branch July 5, 2018 21:40
ljharb added a commit that referenced this pull request Aug 8, 2018
 - [new] add `isFragment` (#1733)
 - [new] Add `displayNameOfNode`, `isValidElementType`
 - [new] `mount`: add `hydrateIn` option (#1317, #1707)
 - [new] Add support for react context element types (#1513)
 - [new] `shallow`: Add getSnapshotBeforeUpdate support (#1657)
 - [fix] portals and roots may render fragments (#1733)
 - [fix] add missing support for animation events (#1569)
 - [fix] `shallow`: SFCs do not get a `this` (#1703)
 - [refactor]: add “lifecycles” adapter option (#1696)
 - [fix] call ref for a root element (#1541)
 - [fix] Allow empty strings as key props (#1524)
 - [fix] Fix ShallowWrapper for array-rendering components (#1498)
 - [refactor] use `react-is` package
 - [meta] ensure a license and readme is present in all packages when published
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants