-2

Starting yarn like yarn start, but log message is not present in console when pressing button.

enter image description here

tk421
  • 5,775
  • 6
  • 23
  • 34
János
  • 32,867
  • 38
  • 193
  • 353

2 Answers2

1

It's client-side JavaScript. It will log in the browser (specifically in the Console of the Developer Tools), not in the build tool chain (nor in the server started by the build tool chain).

Related: What is the difference between client-side and server-side programming?

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
1

Because it is the callback will be invoked when you click on the button in a browser.

You could see this log in a browser console.

In other words - this function won't be invoked while the yarn is compiling code

Genrikh
  • 9
  • 2