bvaughn/react-devtools-experimental

How is the location filter used?

vnvizitiu opened this issue · 3 comments

Hello,

I tried to look through the source code to figure it out but i admit i might be at a loss.

Could you please document or tell me how the location filter is used? It sais Regex but could it work to filter out an explicit path like for xpath or something?

Thanks,
Vlad V.

Could you please document

Once this extension is released as more than a beta, we'll document things. This repo has "experimental" in the name after all 😁

It sais Regex but could it work to filter out an explicit path like for xpath or something?

It's a regex that filters based on the source code (file) location, if that information is available to React (meaning if the source metadata was included by the compiler).

@bvaughn

Once this extension is released as more than a beta, we'll document things.

I have searched for about an hour for a single example of how to use the location filter, and I have not found even one. This issue was the most relevant thing I found.

The DevTools is released, but no docs is available anywhere (or at least anywhere searchable).

The DevTools is released, but no docs is available anywhere (or at least anywhere searchable).

The release of the DevTools was accompanied by a blog post which linked to an interactive tutorial as well as a pretty detailed changelog. I also recently gave a talk about DevTools at React conf that walked through several of the features (including component filters).

To be fair, none of these really went into depth about the location filter but I guess that's because I thought it didn't need a lot of explanation. (Sorry!) If your builds tools include source location info with React elements (file name and file system location) you'll be able to filter by that info.