Disable rule for react-router-dom <Route/> element.
Opened this issue · 0 comments
I've been having problems with the Route component of react-router-dom. I saw a couple of comments on Reddit and some internet forums about a way to solve the warning/error that the jsx-no-jsx-as-prop rule throws, but honestly, it makes the code too complicated just to not get that error. It would be a good idea to ignore this component, since to keep a cleaner code, at least in this case this rule does not help much. Maybe it would be even better to have a function that gives us the possibility to put something like:
{
ignoreList: [“Route”],
}
I am not an expert, but I think that something like this would work better, since I don't know if there are other components out there that need something like this and instead of helping it would hurt the developer, but disabling this rule is not an option, because it is very useful in most cases.