Find the component you are looking for in a tree, recursively.
The tree to search through
The filter. Either a string or a function. Should be unique
The max depth. Avoids call stack exceeded error.
The component you are looking for
Find the component you are looking for in a tree, recursively.