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

possibly unnecessary dependency to lodash #867

Closed
OlafMerkert opened this issue Feb 4, 2018 · 3 comments
Closed

possibly unnecessary dependency to lodash #867

OlafMerkert opened this issue Feb 4, 2018 · 3 comments

Comments

@OlafMerkert
Copy link

The only usage of lodash is in verifyPlainObject.js imports isPlainObject.

However redux itself also includes an isPlainObject function. Using this would allow to remove the dependency on lodash.

@timdorr
Copy link
Member

timdorr commented Feb 4, 2018

That function isn't exported at the moment, as we're waiting on some upstream lodash changes that will let us bring it back in with minimal bundle size impact.

But copying it over shouldn't be a big deal. There are some edge cases it doesn't handle, but it should be fine for our purposes here.

@OlafMerkert
Copy link
Author

Ah ok. I was just wondering why this was handled differently in redux and react-redux.

@a-x-
Copy link

a-x- commented Apr 14, 2018

lodash/isPlainObject might be too slow because it does extra checks.
Are you sure, you need all of lodash/isPlainObject checks?

Redux issue: reduxjs/redux#2599

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

No branches or pull requests

3 participants