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

Add usePureComponent option #357

Merged
merged 5 commits into from
Dec 13, 2017
Merged

Add usePureComponent option #357

merged 5 commits into from
Dec 13, 2017

Conversation

ahoseinian
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.03%) to 81.25% when pulling 39e9468 on ahoseinian:master into 4276370 on i18next:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.03%) to 81.25% when pulling c3ff34d on ahoseinian:master into 4276370 on i18next:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.03%) to 81.25% when pulling a3bd945 on ahoseinian:master into 4276370 on i18next:master.

Copy link
Member

@jamuhl jamuhl left a comment

Choose a reason for hiding this comment

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

what about the import shallowEqual from 'fbjs/lib/shallowEqual'; dependency introduced?

src/translate.js Outdated
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import hoistStatics from 'hoist-non-react-statics';
import shallowEqual from 'fbjs/lib/shallowEqual';
Copy link
Member

Choose a reason for hiding this comment

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

does that not need additional dependency fbjs?

if so i would prefer not pulling in a that heavy dependency and prefer copy over of: https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/shallowEqual.js

Copy link
Author

Choose a reason for hiding this comment

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

As we are already dependent to React and react is dependent to fbjs I thought this is ok! however if you think copying shallowEqual is a better option I can change it?

Copy link
Member

Choose a reason for hiding this comment

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

runs also in preact -> that's why pulling in a dependency of react is a bad idea

Copy link
Author

Choose a reason for hiding this comment

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

oh I see

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.7%) to 76.563% when pulling 1cec3d1 on ahoseinian:master into 4276370 on i18next:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.7%) to 76.563% when pulling 589508b on ahoseinian:master into 4276370 on i18next:master.

@jamuhl
Copy link
Member

jamuhl commented Dec 6, 2017

would it be possible to add a test case? so we get coverage up again...regarding the codeclimate that shallowEqual file could be excluded in the codeclimate.yml

@jamuhl jamuhl merged commit 114f9e0 into i18next:master Dec 13, 2017
@jamuhl
Copy link
Member

jamuhl commented Dec 13, 2017

published with [email protected]

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