GriddleGriddle / Griddle

Simple Grid Component written in React
http://griddlegriddle.github.io/Griddle/
MIT License
2.5k stars 378 forks source link

import lodash functions instead of whole lib #855

Closed lvaldovinos closed 5 years ago

lvaldovinos commented 5 years ago

Griddle major version

1.x

Changes proposed in this pull request

Import lodash functions that are used in code, instead of whole lodash lib.

Why these changes are made

854 was created and requested by @ryanlanciaux

Are there tests?

No, existing tests weren't changed.

lvaldovinos commented 5 years ago

hey @ryanlanciaux I've merged changes in #849 into this one, so I think #849 needs to be landed first.

docrinehart commented 5 years ago

@lvaldovinos #849 was merged, it would be great if you could rebase this. :)

docrinehart commented 5 years ago

Running the branch locally, I get an error for all the pages I checked. Didn't have time to dig further:

key.endsWith is not a function
    TypeError: key.endsWith is not a function
    at isKeyGriddleHook (http://localhost:6006/main.9ce98f9f214acf7ea079.bundle.js:6463:67)
    at http://localhost:6006/main.9ce98f9f214acf7ea079.bundle.js:6471:9
    at basePickBy (http://localhost:6006/vendors~main.9ce98f9f214acf7ea079.bundle.js:33628:9)
    at pickBy (http://localhost:6006/vendors~main.9ce98f9f214acf7ea079.bundle.js:34772:32)
    at removeHooksFromObject (http://localhost:6006/main.9ce98f9f214acf7ea079.bundle.js:6470:63)
    at buildGriddleReducerObject (http://localhost:6006/main.9ce98f9f214acf7ea079.bundle.js:6562:39)
    at buildGriddleReducer (http://localhost:6006/main.9ce98f9f214acf7ea079.bundle.js:6609:23)
    at Griddle.initializer (http://localhost:6006/main.9ce98f9f214acf7ea079.bundle.js:7227:95)
    at new Griddle (http://localhost:6006/main.9ce98f9f214acf7ea079.bundle.js:3506:82)
    at constructClassInstance (http://localhost:6006/vendors~main.9ce98f9f214acf7ea079.bundle.js:51577:18)
ryanlanciaux commented 5 years ago

@docrinehart Thanks for checking this out. Which browser / ver are you on? Wonder if we'll need to polyfill endsWith

docrinehart commented 5 years ago

Running latest Chrome (75.x) on Mac (Mojave). Gut tells me it's related to key getting a different type than expected at runtime (ie. object vs function, or something along those lines).

lvaldovinos commented 5 years ago

okay, I think I've messed up PR trying to rebase master, I'll close this PR, and re open a new one, sorry for the inconvenience.