Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-children-utilities

> 前端框架
Open source

Extended utils for ⚛️ React.Children data structure that adds recursive filter, map and more methods to iterate nested children.

384 stars0 likes0 views
WebsiteGitHub

About

Extended utils for ⚛️ React.Children data structure that adds recursive filter, map and more methods to iterate nested children.

React Children Utilities

Extended utils for ⚛️ React.Children data structure that adds recursive filter, map and more methods to iterate nested children.

Installation

Can be added to your application after installing the peer dependency react

npm install --save react-children-utilities

Usage

This package extends the existing React.Children utilities, you can import it as a whole.

import React from 'react';
import Children from 'react-children-utilities';

const MyComponent = ({ children }) => {
  const onlySpans = Children.filter(children, (child) => child.type === 'span');
  return 
;
};

Also you can import only the function you need

import React from 'react';
import { filter } from 'react-children-utilities';

const MyComponent = ({ children }) => {
  const onlySpans = filter(children, (child) => child.type === 'span');
  return 
;
};

API documentation

  • deepFilter
  • deepFind
  • deepForEach
  • deepMap
  • filter
  • getElementName
  • groupByType
  • hasChildren
  • hasComplexChildren
  • onlyText
  • onlyValid

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Fernando Pasik

mrm007

yosef langer

iyegoroff

Mark Allen

Ryosuke IWANAGA

Daniel Pinyol

Brian Bartholomew

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT (c) 2016 Fernando Pasik

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptreactreact-libraryreactjs

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架