From 36250fe5676735babdd11a975ba594b572a61d2f Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Wed, 31 Jan 2018 11:43:08 -0600 Subject: [PATCH] Add create-react-app Comes With Lodash as a react til --- README.md | 3 ++- react/create-react-app-comes-with-lodash.md | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 react/create-react-app-comes-with-lodash.md diff --git a/README.md b/README.md index 2c8adae..0414829 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_600 TILs and counting..._ +_601 TILs and counting..._ --- @@ -421,6 +421,7 @@ _600 TILs and counting..._ ### React - [Accessing Env Vars In create-react-app](react/accessing-env-vars-in-create-react-app.md) +- [create-react-app Comes With Lodash](react/create-react-app-comes-with-lodash.md) - [Dispatch Anywhere With Redux](react/dispatch-anywhere-with-redux.md) - [Force A Component To Only Have One Child](react/force-a-component-to-only-have-one-child.md) - [Inactive And Active Component Styles With Radium](react/inactive-and-active-component-styles-with-radium.md) diff --git a/react/create-react-app-comes-with-lodash.md b/react/create-react-app-comes-with-lodash.md new file mode 100644 index 0000000..507714a --- /dev/null +++ b/react/create-react-app-comes-with-lodash.md @@ -0,0 +1,11 @@ +# create-react-app Comes With Lodash + +Lodash is already a dependency of create-react-app. If you need one of those +fancy Lodash functions, there's no need to `yarn add lodash` to your +project, all you need is an import statement. + +```javascript +import chunk from 'lodash/chunk'; +``` + +h/t Dillon Hafer