glideapps / glideapps/glide-data-grid

Migrate from lodash to remeda(or std library functions)

Open
#1,138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.3k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

This is a fantastic tool; however, my team is attempting to move off of lodash in the medium term which is causing some hesitation in using this given the peer dependency.

Reasoning:
```
Lodash was written in Javascript and types were added later. It does not always produce truthful types.

For example, get in lodash often types the return value as non-nullable even when a fallback value is not provided (and thus, the fallback value is undefined).

Another example is groupBy, the lodash version maps null and undefined keys to its own group. In contrast, remeda drops null/undefined keys which makes more sense considering the returned object says it has string keys.
```

Perusing the repo the lodash functions being used are `throttle`, `debounce`, `clamp`, `flatten`, `uniq`, `range`, `isArray`, `noop`, `makeRange`, `groupBy`, `chunk`. All of which could be easily replaced by the standard library EXCEPT for `throttle` and `debounce`.

If I have time soon I may take a crack at replacing lodash with std library functions or dropping in remeda as a replacement if I get the glide team's blessing!

Let me know your thoughts @lukasmasuch

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.