Skip to content

Conversation

@koba04
Copy link
Contributor

@koba04 koba04 commented Oct 7, 2016

This PR has a breaking change.

Supporting all lifecycle methods in ShallowRender merged at #4993, but reverted at #5394.
The reason why the PR is reverted is that it didn't support string refs.

This PR is fixed it.

Currently, ShallowRender is replacing _renderValidatedComponent with _renderValidatedComponentWithoutOwnerOrContext, which it seems to be a little hacky.

-    _renderValidatedComponent:     
-      ReactCompositeComponent      
-        ._renderValidatedComponentWithoutOwnerOrContext,

I think it's better to assign null to _onwer filed.

@koba04
Copy link
Contributor Author

koba04 commented Oct 10, 2016

Enzyme is supporting all lifecycle methods in shallow with lifecycleExperimental flag, which is implemented in outside of React.

The implementation has some dirty hacks. I think it would be nice If this PR is merged, I can remove it.

@koba04
Copy link
Contributor Author

koba04 commented Nov 14, 2016

@spicyj Could you review this?

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.

4 participants