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

Shallow renderer passes context to componentWillReceiveProps #10342

Merged
merged 1 commit into from Aug 2, 2017

Conversation

Projects
None yet
4 participants
@bvaughn
Contributor

bvaughn commented Aug 1, 2017

In a recent conversation between @lelandrichardson, @flarnie, and myself, @lelandrichardson pointed out that the new React 16 shallow renderer did not pass the 2nd param, context, to componentWillReceiveProps.

This was an oversight that has been corrected with this PR. I also added a new test to ensure that the new shallow renderer passes the expected params (and only those params) to each lifecycle method.

@bvaughn bvaughn requested a review from flarnie Aug 1, 2017

Shallow renderer passes context to componentWillReceiveProps
This parameter was accidentally omitted before. Leland reported it because it impacts Enzyme.
I also added a basic lifecycle parameter test for shallow renderer.
@flarnie

flarnie approved these changes Aug 2, 2017

sweet!

@flarnie

This comment has been minimized.

Show comment
Hide comment
@flarnie

flarnie Aug 2, 2017

Contributor

thumb-awesomekitty

Contributor

flarnie commented Aug 2, 2017

thumb-awesomekitty

@bvaughn bvaughn referenced this pull request Aug 2, 2017

Closed

React 16 RC #10294

@bvaughn bvaughn merged commit 2da37a8 into facebook:master Aug 2, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@bvaughn bvaughn deleted the bvaughn:shallow-renderer-componentWillReceiveProps-context-param branch Aug 2, 2017

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