jsx-test icon indicating copy to clipboard operation
jsx-test copied to clipboard

withContext deprecation

Open roderickhsiao opened this issue 10 years ago • 3 comments

React 14 change to be parent base context and remove withContext method. https://facebook.github.io/react/docs/context.html

we should probably remove https://github.com/yahoo/jsx-test/blob/master/lib/helper.js#L128

@3den @mridgway

roderickhsiao avatar Nov 18 '15 10:11 roderickhsiao

@roderickhsiao I think we still need some way to pass the context to components being tested. We can keep the same api on jsx-test but change the implantation to support the new react style. Do you have some suggestion of how to do that?

3den avatar Nov 18 '15 19:11 3den

@roderickhsiao I'm not sure this needs to be removed. The way the withContext method in here is passing down the context is exactly how the docs describe. The method might be named poorly when compared to the withContext method in react but what it does within is still how react uses context in 0.14

akshayp avatar Nov 18 '15 22:11 akshayp

thats true, probably only the naming suggest the old way react did.

roderickhsiao avatar Nov 19 '15 00:11 roderickhsiao