glenjamin / glenjamin/skin-deep
More granular query methods with predicate function and/or props
- Dominant language
- JavaScript
- Stars
- 198
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
It would be great to be able to do more granular searches by passing a props or function argument to query methods):
``` js
// Given the following tree:
tree.findComponent('Widget', { title: 'First' });
// =>
tree.findComponent('Widget', { active: false });
// =>
tree.findComponent('Widget', (props) => props.count > 25);
// =>
```
On a related note, it would be nice if there was an `everySubTreeLike` method analogous to `findComponentLike` and more "plural" methods to return multiple nodes/components e.g. `findNodes`/`findComponents(Like)`/whathaveyou.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing findComponent and findComponentLike query methods to understand their current matching behavior. Clarify whether predicate and props matching, everySubTreeLike, and plural query methods are all in scope, then define tests for the agreed API and its expected returned nodes or components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100