Skip to content

Conversation

@gcornut
Copy link
Member

@gcornut gcornut commented Dec 2, 2025

Greatly reduce the use of lodash when it makes sense

  • refactor(utils): remove use of lodash/isEmpty => Create a simpler version based on Object.entries
  • refactor(utils): remove use of lodash/isFunction => Not really needed
  • refactor(utils): remove use of lodash/get => Use vanilla JS
  • refactor(utils): remove use of lodash/set => Use vanilla JS
  • refactor(utils): remove use of lodash/noop => Not really needed
  • refactor(utils): remove use of lodash/pick => Not really needed
  • refactor(utils): remove use of lodash/isInteger => Number.isInteger
  • refactor(utils): remove use of lodash/range => Create a simpler version based on Array.from
  • refactor(utils): remove use of lodash/pull => Not really needed
  • refactor(utils): remove use of lodash/castArray => Create a simpler version based on Array.isArray
  • refactor(utils): remove use of lodash/isObject => Use vanilla JS
  • refactor(utils): remove use of lodash/take => Use vanilla JS
  • refactor(utils): remove use of lodash/chunk => Create a simpler version (with better types and perf)
  • refactor(utils): remove use of lodash/last => Create a simpler version
  • refactor(utils): remove use of lodash/isBoolean => Use vanilla JS
  • refactor(utils): refactor partitionMulti to remove lodash => Create a simpler version (with better types and perf)
  • refactor(utils): remove use of lodash/kebabCase => Create a simpler version

The remaining use of lodash:

  • lodash/memoize
  • lodash/throttle

=> These are complex to re-create and already used in lumapps, meaning we don't really pay the cost of importing them here

@gcornut gcornut force-pushed the refactor/reduce-usage-of-lodash branch 3 times, most recently from 86cd1be to b9bbfa1 Compare December 2, 2025 16:02
@gcornut gcornut changed the base branch from master to chore/cleanup-lumx-react-module December 3, 2025 15:30
@gcornut gcornut force-pushed the refactor/reduce-usage-of-lodash branch from b9bbfa1 to 2ec6bd8 Compare December 3, 2025 15:30
Base automatically changed from chore/cleanup-lumx-react-module to master December 3, 2025 15:36
@gcornut gcornut force-pushed the refactor/reduce-usage-of-lodash branch from 2ec6bd8 to b38aca2 Compare December 3, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant