ThakurBallary / react-native-radio-buttons-group

Simple, best and easy to use radio buttons for react native apps.
MIT License
263 stars 71 forks source link

Don't import the whole lodash library #35

Closed hirbod closed 2 years ago

hirbod commented 2 years ago

You are importing the whole lodash library for a single function. This is a terrible pattern and will bloat the bundle, since there is no tree shaking at all.

If you just need isEqual, please use it like this:

npm install --save lodash.isequal
# or
yarn add lodash.isequal

and import

import isEqual from 'lodash.isequal';
ThakurBallary commented 2 years ago

@Hirbod thanks for writing. Release v2.2.8 with the changes you mentioned above.