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

Refactor the use of lodash #22

Open
hongaar opened this issue Nov 20, 2019 · 1 comment
Open

Refactor the use of lodash #22

hongaar opened this issue Nov 20, 2019 · 1 comment
Labels
Good first issue 👶 Good for newcomers

Comments

@hongaar
Copy link
Member

hongaar commented Nov 20, 2019

In a lot of places lodash is used for things which can be achieved using vanilla JS (e.g. _.isFunction, _.isArray, etc.). In order to decrease the dependency surface, we could try to factor out as much lodash as reasonably possible.

Not sure what the best way to import lodash would be:

import { isEqual } from 'lodash'
// or
import isEqual from 'lodash/isEqual'

The current method (import _ from 'lodash') is not the best way.

@hongaar hongaar added the Good first issue 👶 Good for newcomers label Nov 20, 2019
@AdrieanKhisbe
Copy link
Member

decrease the dependency surface ?
Is that that relevant? We dont have treeshaking we something like wepback.

If so, destructuring (1) is more than preferable to subpath (2). Even more when we need different utilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue 👶 Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants