DEV Community

Discussion on: Why I will no longer be using console.log() to check React state updates

kingkool68 profile image
Russell Heimlich

I just saw another neat console trick the other day that you could combine with console.table() as well.

console.log({ myVariable }); // Same as { myVariable: 'whatever the variable value is' }
Enter fullscreen mode Exit fullscreen mode

Now your logged values are named.

hymanaharon profile image
Aharon Hyman Author

That's pretty cool as well thanks for showing it to me!