lodash
A modern JavaScript utility library delivering modularity, performance, & extras.
- 61k
- JavaScript
- 8 wk ago
โ๏ธ ๐ง Lodash as React components
Repo typicode/react-lodash, read from GitHub 1 min ago. typicode has not joined Take My Repo.
typicode/react-lodash is a public repo on GitHub by typicode. โ๏ธ ๐ง Lodash as React components. It declares the MIT license on GitHub. It is written mainly in JavaScript, has 351 stars and last changed on 2019-01-02. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-23.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Use any lodash function as a React component
import react from 'react' array && array.length ? ( <ul> {array.map(i => ( <li key={i}>{i}</li> ))} </ul> ) : ( 'Empty list' )
The example below uses lodash _.isEmpty and _.map as components.
import react from 'react' import { IsEmpty, Map } from "react-lodash" <IsEmpty value={array} yes="Empty list" no={() => ( <ul> <Map collection={array} iteratee={i => <li key={i}>{i}</li>} /> </ul> )} />
You can play with react-lodash on CodeSandbox
npm install react-lodash
Why?
I wanted to know how things could be rewritten with lodash as components and if generating them directly from lodash JSDoc was possible.
The answer to the latter is obviously yes (otherwise, this repo wouldn't exist ๐). react-lodash is therefore a 1:1 mapping with lodash API and all components are generated using npm run generate.
It also means that not all react-lodash components will make sense in a React app. Particularly the ones that mutate data.
Does it work?
Yes, you can try it on CodeSandbox.
Should you use it?
If you have a personal/small project and want to play with react-lodash, feel free. Some components might be useful or provide some interesting features.
For bigger projects, you should probably stick to plain JS as it's more familiar and works better with typing systems.
In any case, I had fun building this project and I hope you'll find the idea entertaining :)
react-lodash uses lodash documentation for prop names.
For example, let's say you want to use _.get. Based on lodash documentation, it takes an object and path arguments, so <Get /> will have the same props.
const object = { a: { b: { 1 } } } const path = 'a.b' // lodash _.get(object, path) // react-lodash <Get object={object} path={path} />
Also every react-lodash component accepts a children render prop:
<Get object={object} path={path}> {value => <UpperCase string={value} />} </Get>
For lodash functions that return a boolean, react-lodash components accept yes and no render props:
<IsEmpty value={array} yes={() => <p>empty</p>} no={() => <p>not empty</p>} />
You can either use named imports or individually import components
import { IsEmpty } from 'react-lodash'
import IsEmpty from 'react-lodash/lib/IsEmpty'
Below you'll find the 296 available components. For detailed documentation, you can visit https://lodash.com/docs
Note: Since react-lodash is 1:1 mapping of lodash, maybe not all components will be relevant in a React application. But at least, you have many options ;)
<Chunk array={} size={} /> โ _.chunk<Compact array={} /> โ _.compact<Concat array={} values={} /> โ _.concat<Difference array={} values={} /> โ _.difference<DifferenceBy array={} values={} iteratee={} /> โ _.differenceBy<DifferenceWith array={} values={} comparator={} /> โ _.differenceWith<Drop array={} n={} /> โ _.drop<DropRight array={} n={} /> โ _.dropRight<DropRightWhile array={} predicate={} /> โ _.dropRightWhile<DropWhile array={} predicate={} /> โ _.dropWhile<Fill array={} value={} start={} end={} /> โ _.fill<FindIndex array={} predicate={} fromIndex={} /> โ _.findIndex<FindLastIndex array={} predicate={} fromIndex={} /> โ _.findLastIndex<First array={} /> โ _.first<Flatten array={} /> โ _.flatten<FlattenDeep array={} /> โ _.flattenDeep<FlattenDepth array={} depth={} /> โ _.flattenDepth<FromPairs pairs={} /> โ _.fromPairs<IndexOf array={} value={} fromIndex={} /> โ _.indexOf<Initial array={} /> โ _.initial<Intersection arrays={} /> โ _.intersection<IntersectionBy arrays={} iteratee={} /> โ _.intersectionBy<IntersectionWith arrays={} comparator={} /> โ _.intersectionWith<Join array={} separator={} /> โ _.join<Last array={} /> โ _.last<LastIndexOf array={} value={} fromIndex={} /> โ _.lastIndexOf<Nth array={} n={} /> โ _.nth<Pull array={} values={} /> โ _.pull<PullAll array={} values={} /> โ _.pullAll<PullAllBy array={} values={} iteratee={} /> โ _.pullAllBy<PullAllWith array={} values={} comparator={} /> โ _.pullAllWith<PullAt array={} indexes={} /> โ _.pullAt<Remove array={} predicate={} /> โ _.remove<Reverse array={} /> โ _.reverse<Slice array={} start={} end={} /> โ _.slice<SortedIndex array={} value={} /> โ _.sortedIndex<SortedIndexBy array={} value={} iteratee={} /> โ _.sortedIndexBy<SortedIndexOf array={} value={} /> โ _.sortedIndexOf<SortedLastIndex array={} value={} /> โ _.sortedLastIndex<SortedLastIndexBy array={} value={} iteratee={} /> โ _.sortedLastIndexBy<SortedLastIndexOf array={} value={} /> โ _.sortedLastIndexOf<SortedUniq array={} /> โ _.sortedUniq<SortedUniqBy array={} iteratee={} /> โ _.sortedUniqBy<Tail array={} /> โ _.tail<Take array={} n={} /> โ _.take<TakeRight array={} n={} /> โ _.takeRight<TakeRightWhile array={} predicate={} /> โ _.takeRightWhile<TakeWhile array={} predicate={} /> โ _.takeWhile<Union arrays={} /> โ _.union<UnionBy arrays={} iteratee={} /> โ _.unionBy<UnionWith arrays={} comparator={} /> โ _.unionWith<Uniq array={} /> โ _.uniq<UniqBy array={} iteratee={} /> โ _.uniqBy<UniqWith array={} comparator={} /> โ _.uniqWith<Unzip array={} /> โ _.unzip<UnzipWith array={} iteratee={} /> โ _.unzipWith<Without array={} values={} /> โ _.without<Xor arrays={} /> โ _.xor<XorBy arrays={} iteratee={} /> โ _.xorBy<XorWith arrays={} comparator={} /> โ _.xorWith<Zip arrays={} /> โ _.zip<ZipObject props={} values={} /> โ _.zipObject<ZipObjectDeep props={} values={} /> โ _.zipObjectDeep<ZipWith arrays={} iteratee={} /> โ _.zipWith<CountBy collection={} iteratee={} /> โ _.countBy<Each collection={} iteratee={} /> โ _.each<EachRight collection={} iteratee={} /> โ _.eachRight<Every collection={} predicate={} /> โ _.every<Filter collection={} predicate={} /> โ _.filter<Find collection={} predicate={} fromIndex={} /> โ _.find<FindLast collection={} predicate={} fromIndex={} /> โ _.findLast<FlatMap collection={} iteratee={} /> โ _.flatMap<FlatMapDeep collection={} iteratee={} /> โ _.flatMapDeep<FlatMapDepth collection={} iteratee={} depth={} /> โ _.flatMapDepth<GroupBy collection={} iteratee={} /> โ _.groupBy<Includes collection={} value={} fromIndex={} /> โ _.includes<InvokeMap collection={} path={} args={} /> โ _.invokeMap<KeyBy collection={} iteratee={} /> โ _.keyBy<Map collection={} iteratee={} /> โ _.map<OrderBy collection={} iteratees={} orders={} /> โ _.orderBy<Partition collection={} predicate={} /> โ _.partition<Reduce collection={} iteratee={} accumulator={} /> โ _.reduce<ReduceRight collection={} iteratee={} accumulator={} /> โ _.reduceRight<Reject collection={} predicate={} /> โ _.reject<Sample collection={} /> โ _.sample<SampleSize collection={} n={} /> โ _.sampleSize<Shuffle collection={} /> โ _.shuffle<Size collection={} /> โ _.size<Some collection={} predicate={} /> โ _.some<SortBy collection={} iteratees={} /> โ _.sortBy<Now /> โ _.now<After n={} func={} /> โ _.after<Ary func={} n={} /> โ _.ary<Before n={} func={} /> โ _.before<Bind func={} thisArg={} partials={} /> โ _.bind<BindKey object={} key={} partials={} /> โ _.bindKey<Curry func={} arity={} /> โ _.curry<CurryRight func={} arity={} /> โ _.curryRight<Debounce func={} wait={} options={} /> โ _.debounce<Defer func={} args={} /> โ _.defer<Delay func={} wait={} args={} /> โ _.delay<Flip func={} /> โ _.flip<Memoize func={} resolver={} /> โ _.memoize<Negate predicate={} /> โ _.negate<Once func={} /> โ _.once<OverArgs func={} transforms={} /> โ _.overArgs<Partial func={} partials={} /> โ _.partial<PartialRight func={} partials={} /> โ _.partialRight<Rearg func={} indexes={} /> โ _.rearg<Rest func={} start={} /> โ _.rest<Spread func={} start={} /> โ _.spread<Throttle func={} wait={} options={} /> โ _.throttle<Unary func={} /> โ _.unary<Wrap value={} wrapper={} /> โ _.wrap<CastArray value={} /> โ _.castArray<Clone value={} /> โ _.clone<CloneDeep value={} /> โ _.cloneDeep<CloneDeepWith value={} customizer={} /> โ _.cloneDeepWith<CloneWith value={} customizer={} /> โ _.cloneWith<ConformsTo object={} source={} /> โ _.conformsTo<Eq value={} other={} /> โ _.eq<Gt value={} other={} /> โ _.gt<Gte value={} other={} /> โ _.gte<IsArguments value={} /> โ _.isArguments<IsArray value={} /> โ _.isArray<IsArrayBuffer value={} /> โ _.isArrayBuffer<IsArrayLike value={} /> โ _.isArrayLike<IsArrayLikeObject value={} /> โ _.isArrayLikeObject<IsBoolean value={} /> โ _.isBoolean<IsBuffer value={} /> โ _.isBuffer<IsDate value={} /> โ _.isDate<IsElement value={} /> โ _.isElement<IsEmpty value={} /> โ _.isEmpty<IsEqual value={} other={} /> โ _.isEqual<IsEqualWith value={} other={} customizer={} /> โ _.isEqualWith<IsError value={} /> โ _.isError<IsFinite value={} /> โ _.isFinite<IsFunction value={} /> โ _.isFunction<IsInteger value={} /> โ _.isInteger<IsLength value={} /> โ _.isLength<IsMap value={} /> โ _.isMap<IsMatch object={} source={} /> โ _.isMatch<IsMatchWith object={} source={} customizer={} /> โ _.isMatchWith<IsNaN value={} /> โ _.isNaN<IsNative value={} /> โ _.isNative<IsNil value={} /> โ _.isNil<IsNull value={} /> โ _.isNull<IsNumber value={} /> โ _.isNumber<IsObject value={} /> โ _.isObject<IsObjectLike value={} /> โ _.isObjectLike<IsPlainObject value={} /> โ _.isPlainObject<IsRegExp value={} /> โ _.isRegExp<IsSafeInteger value={} /> โ _.isSafeInteger<IsSet value={} /> โ _.isSet<IsString value={} /> โ _.isString<IsSymbol value={} /> โ _.isSymbol<IsTypedArray value={} /> โ _.isTypedArray<IsUndefined value={} /> โ _.isUndefined<IsWeakMap value={} /> โ _.isWeakMap<IsWeakSet value={} /> โ _.isWeakSet<Lt value={} other={} /> โ _.lt<Lte value={} other={} /> โ _.lte<ToArray value={} /> โ _.toArray<ToFinite value={} /> โ _.toFinite<ToInteger value={} /> โ _.toInteger<ToLength value={} /> โ _.toLength<ToNumber value={} /> โ _.toNumber<ToPlainObject value={} /> โ _.toPlainObject<ToSafeInteger value={} /> โ _.toSafeInteger<ToString value={} /> โ _.toString<Add augend={} addend={} /> โ _.add<Ceil number={} precision={} /> โ _.ceil<Divide dividend={} divisor={} /> โ _.divide<Floor number={} precision={} /> โ _.floor<Max array={} /> โ _.max<MaxBy array={} iteratee={} /> โ _.maxBy<Mean array={} /> โ _.mean<MeanBy array={} iteratee={} /> โ _.meanBy<Min array={} /> โ _.min<MinBy array={} iteratee={} /> โ _.minBy<Multiply multiplier={} multiplicand={} /> โ _.multiply<Round number={} precision={} /> โ _.round<Subtract minuend={} subtrahend={} /> โ _.subtract<Sum array={} /> โ _.sum<SumBy array={} iteratee={} /> โ _.sumBy<Clamp number={} lower={} upper={} /> โ _.clamp<InRange number={} start={} end={} /> โ _.inRange<Random lower={} upper={} floating={} /> โ _.random<Assign object={} sources={} /> โ _.assign<AssignWith object={} sources={} customizer={} /> โ _.assignWith<At object={} paths={} /> โ _.at<Create prototype={} properties={} /> โ _.create<Defaults object={} sources={} /> โ _.defaults<DefaultsDeep object={} sources={} /> โ _.defaultsDeep<Entries object={} /> โ _.entries<EntriesIn object={} /> โ _.entriesIn<Extend object={} sources={} /> โ _.extend<ExtendWith object={} sources={} customizer={} /> โ _.extendWith<FindKey object={} predicate={} /> โ _.findKey<FindLastKey object={} predicate={} /> โ _.findLastKey<ForIn object={} iteratee={} /> โ _.forIn<ForInRight object={} iteratee={} /> โ _.forInRight<ForOwn object={} iteratee={} /> โ _.forOwn<ForOwnRight object={} iteratee={} /> โ _.forOwnRight<Functions object={} /> โ _.functions<FunctionsIn object={} /> โ _.functionsIn<Get object={} path={} defaultValue={} /> โ _.get<Has object={} path={} /> โ _.has<HasIn object={} path={} /> โ _.hasIn<Invert object={} /> โ _.invert<InvertBy object={} iteratee={} /> โ _.invertBy<Invoke object={} path={} args={} /> โ _.invoke<Keys object={} /> โ _.keys<KeysIn object={} /> โ _.keysIn<MapKeys object={} iteratee={} /> โ _.mapKeys<MapValues object={} iteratee={} /> โ _.mapValues<Merge object={} sources={} /> โ _.merge<MergeWith object={} sources={} customizer={} /> โ _.mergeWith<Omit object={} paths={} /> โ _.omit<OmitBy object={} predicate={} /> โ _.omitBy<Pick object={} paths={} /> โ _.pick<PickBy object={} predicate={} /> โ _.pickBy<Result object={} path={} defaultValue={} /> โ _.result<Set object={} path={} value={} /> โ _.set<SetWith object={} path={} value={} customizer={} /> โ _.setWith<Transform object={} iteratee={} accumulator={} /> โ _.transform<Unset object={} path={} /> โ _.unset<Update object={} path={} updater={} /> โ _.update<UpdateWith object={} path={} updater={} customizer={} /> โ _.updateWith<Values object={} /> โ _.values<ValuesIn object={} /> โ _.valuesIn<Chain value={} /> โ _.chain<Tap value={} interceptor={} /> โ _.tap<Thru value={} interceptor={} /> โ _.thru<CamelCase string={} /> โ _.camelCase<Capitalize string={} /> โ _.capitalize<Deburr string={} /> โ _.deburr<EndsWith string={} target={} position={} /> โ _.endsWith<Escape string={} /> โ _.escape<EscapeRegExp string={} /> โ _.escapeRegExp<KebabCase string={} /> โ _.kebabCase<LowerCase string={} /> โ _.lowerCase<LowerFirst string={} /> โ _.lowerFirst<Pad string={} length={} chars={} /> โ _.pad<PadEnd string={} length={} chars={} /> โ _.padEnd<PadStart string={} length={} chars={} /> โ _.padStart<ParseInt string={} radix={} /> โ _.parseInt<Repeat string={} n={} /> โ _.repeat<Replace string={} pattern={} replacement={} /> โ _.replace<SnakeCase string={} /> โ _.snakeCase<Split string={} separator={} limit={} /> โ _.split<StartCase string={} /> โ _.startCase<StartsWith string={} target={} position={} /> โ _.startsWith<Template string={} options={} /> โ _.template<ToLower string={} /> โ _.toLower<ToUpper string={} /> โ _.toUpper<Trim string={} chars={} /> โ _.trim<TrimEnd string={} chars={} /> โ _.trimEnd<TrimStart string={} chars={} /> โ _.trimStart<Truncate string={} options={} /> โ _.truncate<Unescape string={} /> โ _.unescape<UpperCase string={} /> โ _.upperCase<UpperFirst string={} /> โ _.upperFirst<Words string={} pattern={} /> โ _.words<Attempt func={} args={} /> โ _.attempt<BindAll object={} methodNames={} /> โ _.bindAll<Cond pairs={} /> โ _.cond<Conforms source={} /> โ _.conforms<Constant value={} /> โ _.constant<DefaultTo value={} defaultValue={} /> โ _.defaultTo<Flow funcs={} /> โ _.flow<FlowRight funcs={} /> โ _.flowRight<Identity value={} /> โ _.identity<Iteratee func={} /> โ _.iteratee<Matches source={} /> โ _.matches<MatchesProperty path={} srcValue={} /> โ _.matchesProperty<Method path={} args={} /> โ _.method<MethodOf object={} args={} /> โ _.methodOf<Mixin object={} source={} options={} /> โ _.mixin<Noop /> โ _.noop<NthArg n={} /> โ _.nthArg<Over iteratees={} /> โ _.over<OverEvery predicates={} /> โ _.overEvery<OverSome predicates={} /> โ _.overSome<Property path={} /> โ _.property<PropertyOf object={} /> โ _.propertyOf<Range start={} end={} step={} /> โ _.range<RangeRight start={} end={} step={} /> โ _.rangeRight<StubArray /> โ _.stubArray<StubFalse /> โ _.stubFalse<StubObject /> โ _.stubObject<StubString /> โ _.stubString<StubTrue /> โ _.stubTrue<Times n={} iteratee={} /> โ _.times<ToPath value={} /> โ _.toPath<UniqueId prefix={} /> โ _.uniqueIdMIT
Patreon - Supporters โจ
typicode/react-lodash is a public repo on GitHub by typicode. โ๏ธ ๐ง Lodash as React components.
It declares the MIT license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2019-01-02. GitHub counts 1 open issue and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Reverse engineer anything with agents, from app behavior down to native binaries.
Comfortably monitor your network traffic ๐ต๏ธโโ๏ธ
Flutter makes it easy and fast to build beautiful apps for mobile and beyond
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source โ self-host for your organization with complete privacy.
Get a full fake REST API with zero coding in less than 30 seconds (seriously)

๐ฉ A simple process manager for developers. Start apps from your browser and access them using local domains
๐ท Create a timelapse of your web development... or just automatically take screenshots of your hard work ;)