Component definition is missing display name react/display-name Put the function in a variable, set displayName on the function, and then export it.
1 2 3 4 5 6 7 8 9 10 11 | const MyComponent = () => ( <Switch> <Route path="/login" exact component={LoginApp}/> <Route path="/faq" exact component={FAQ}/> <Route component={NotFound} /> </Switch> ); MyComponent.displayName = 'MyComponent'; export default MyComponent; |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.