Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/onurkerimov/react-nested

An experimental plugin that hides nested wrapper components in React DevTools
https://github.com/onurkerimov/react-nested

Last synced: 13 days ago
JSON representation

An experimental plugin that hides nested wrapper components in React DevTools

Awesome Lists containing this project

README

        

# react-nested
This is an experimental plugin. It helps you hide nested parent components while using React DevTools. Exports `ReactNested` component which has `parents` prop. Components you specify in this prop will be used as wrappers. What this plugin does under the hood is adding `_hidden_` suffix to display names of your components by cloning them.

## Usage

Without using **react-nested**:

```js
import ReactNested from 'react-nested'

ReactDOM.render(








,
document.getElementById('root')
);
```

With **react-nested**:

```js
import ReactNested from 'react-nested'

ReactDOM.render(
,
(props) => ,
(props) => ,
(props) => ,
]}
>

,
document.getElementById('root')
);
```
There is also one more step: In your React DevTools, by clicking 'Add Filter' in settings, add the following filter:
**Hide components when 'name' matches '\_hidden\_'**
![](./assets/settings.png)

## Comparison
|Without this plugin|With this plugin|With this plugin,
Filter is set on Settings|
|-|-|-|
| ![](./assets/without.png) | ![](./assets/with.png) | ![](./assets/with2.png) |