Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/onurkerimov/react-nested
- Owner: onurkerimov
- Created: 2020-05-30T22:33:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T23:14:24.000Z (over 4 years ago)
- Last Synced: 2024-10-11T03:44:00.408Z (about 1 month ago)
- Language: JavaScript
- Size: 159 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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) |