为什么我不能在此React组件中显示console.log?

好的,我将向您展示图片的问题,以便您可以正确理解。

-这是我用作参考的代码。它可以正常工作:

enter image description here

-这是我的代码:

enter image description here

Okay, in my case, the app works 'right'. The problem is the console doesn't shows the console.log. I tried changing all features of the code and nothing (routes, directories...). If i use a console.log with a random string in order to comprobe it (for example, console.log('hello world')), and IT IS OUTSIDE of the export function, the console shows it; but if i put inside (which is the idea) doesn't show anything.

你可以帮帮我吗?谢谢!

评论