All Projects → fernandopasik → React Children Utilities

fernandopasik / React Children Utilities

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

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Children Utilities

Utils
A collection of useful PHP functions, mini classes and snippets that you need and can use every day.
Stars: ✭ 750 (+387.01%)
Mutual labels:  utils, utility-library
go-tools
A utility tool library of Golang.
Stars: ✭ 44 (-71.43%)
Mutual labels:  utils, utility-library
Bbo
bbo is a utility library of zero dependencies for javascript. 🍖🌭🍔
Stars: ✭ 227 (+47.4%)
Mutual labels:  utils, utility-library
Sassyfication
💅Library with sass mixins to speed up your css workflow.
Stars: ✭ 51 (-66.88%)
Mutual labels:  utils, utility-library
Notils
Never again need a .utils. package yur scurvy sea dogs!
Stars: ✭ 126 (-18.18%)
Mutual labels:  utility-library
Rails stuff
Collection of useful modules for Rails.
Stars: ✭ 110 (-28.57%)
Mutual labels:  utils
Counter culture
Turbo-charged counter caches for your Rails app.
Stars: ✭ 1,397 (+807.14%)
Mutual labels:  utility-library
Jerryutil
java常用工具类集合
Stars: ✭ 102 (-33.77%)
Mutual labels:  utils
Rambdax
Extended version of Rambda
Stars: ✭ 148 (-3.9%)
Mutual labels:  utils
Ramda Extension
🤘Utility library for functional JavaScript. With ❤️ to Ramda.
Stars: ✭ 139 (-9.74%)
Mutual labels:  utils
Bash Utils
Miscellaneous small utils, mainly for the Bash shell.
Stars: ✭ 121 (-21.43%)
Mutual labels:  utils
Smartbreadcrumbs
A utility library for ASP.NET Core (both MVC and Razor Pages) websites to easily add and customize breadcrumbs.
Stars: ✭ 113 (-26.62%)
Mutual labels:  utility-library
Outils
🚀 前端业务代码工具库
Stars: ✭ 1,721 (+1017.53%)
Mutual labels:  utils
Ppo
ppo is a super small and useful utils library for JavaScript 🐝🐜
Stars: ✭ 105 (-31.82%)
Mutual labels:  utils
Touch Bar Istats
Show CPU/GPU/MEM temperature on Touch Bar with BetterTouchTool!
Stars: ✭ 141 (-8.44%)
Mutual labels:  utils
Utils.js
Fast, small and purely functional utility library
Stars: ✭ 102 (-33.77%)
Mutual labels:  utils
Androidcommon
🔥 一个简单的开源Android工具类库,提供许多常用的类帮助我们开发程序
Stars: ✭ 121 (-21.43%)
Mutual labels:  utils
Note
常规Java工具,算法,加密,数据库,面试题,源代码分析,解决方案
Stars: ✭ 1,846 (+1098.7%)
Mutual labels:  utils
Utils.js
Useful JavaScript Functions Collection 一些很实用的JavaScript函数封装集合
Stars: ✭ 121 (-21.43%)
Mutual labels:  utils
Lbox
Stars: ✭ 116 (-24.68%)
Mutual labels:  utils

React Children Utilities

Gzip Bundle Size Build Status Test Coverage Status Known Vulnerabilities

All Contributors npm version npm downloads

Recursive and extended utils for React children opaque data structure.

Installation

Available as a package and can be added to your application with npm or yarn after installing the peer dependency react

# with yarn
yarn add react-children-utilities react

# with npm
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 <div>{onlySpans}</div>;
};

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 <div>{onlySpans}</div>;
};

API documentation

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) 2018 Fernando Pasik

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].