Skip to content

remove div wrapper from context#81

Merged
tocker merged 3 commits into
masterfrom
feature/remove-div-wraper-from-context
May 30, 2019
Merged

remove div wrapper from context#81
tocker merged 3 commits into
masterfrom
feature/remove-div-wraper-from-context

Conversation

@strausr
Copy link
Copy Markdown
Contributor

@strausr strausr commented Feb 25, 2019

No description provided.

@strausr strausr requested a review from tocker February 25, 2019 13:58

getChildContext() {
let context = {};
let shouldReturnDiv = true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@strausr , where are you using this?

}, {});
return <div {...nonCloudinaryProps}>{this.props.children}</div>;
const {includeOwnBody, ...props} = nonCloudinaryProps;
//{console.log(nonCloudinaryProps.includeonbody);}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@strausr , please remove comments

const {includeOwnBody, ...props} = nonCloudinaryProps;
//{console.log(nonCloudinaryProps.includeonbody);}

return nonCloudinaryProps.includeOwnBody ? this.props.children : <div {...props}>{this.props.children}</div>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@strausr , in line 45 you extracted the value of nonCloudinaryProps.includeOwnBody into a variable, why not using it?

CloudinaryContext.propTypes = CloudinaryComponent.propTypes;
CloudinaryContext.defaultProps = {};
CloudinaryContext.propTypes = {...CloudinaryComponent.propTypes, includeOwnBody: PropTypes.bool};
//CloudinaryContext.propTypes.includeonbody = PropTypes.bool;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@strausr , please remove comments

Comment thread test/ContextTest.js
@asisayag2
Copy link
Copy Markdown
Contributor

@strausr , @tocker , any idea why the tests are failing?

@tocker
Copy link
Copy Markdown
Contributor

tocker commented May 29, 2019

@asisayag2 the source x node 6 test fails because some api is not supported in node 6. I'll exclude this test from the Travis matrix.

@tocker tocker merged commit 995201c into master May 30, 2019
@tocker tocker deleted the feature/remove-div-wraper-from-context branch May 30, 2019 09:09
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

Successfully merging this pull request may close these issues.

3 participants