Skip to content

Consider including Lodash in the project #124

Closed
@justin808

Description

@justin808

Take a look at this:
https://github.com/shakacode/react-webpack-rails-tutorial/pull/123/files#r42269891

The take away is this:

Array.from(document.getElementsByTagName('meta')).find(tag => tag.name === 'csrf-token')

vs with Lodash:

_.find(document.querySelectorAll('meta'), 'name', 'csrf-token')

I find lodash to be my swiss army knife when coding JS, and it fits in well with React.

In fact, Lodash is already an implicit dependency.

https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client/npm-shrinkwrap.json#L2669

Anybody second me?

@alexfedoseev @samnang @josiasds @mapreal19 @dylangrafmyre @rstudner?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions