Last active
September 1, 2023 10:29
-
-
Save rcdexta/77e2198e4b552b027e12480e3c7a1922 to your computer and use it in GitHub Desktop.
Effectively import functions from libararies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //1. Import the entire lodash library and add it to the bundle | |
| import lodash from 'lodash' | |
| lodash.groupBy(rows, 'id') | |
| //2. Import only the required function from lodash | |
| import groupBy from 'lodash/groupBy' | |
| groupBy(rows, 'id') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment