Handling logging in C#Bot client-side
Logging in React can be quite useful for the purposes of testing, it is frequently used to gather information about state updates of a component. Logs can be used to display the value of a string, array, variable or any type of object. If you are already familiar with JavaScript you can use the same console.log function, as demonstrated by the following example:
let x = ["apple", "banana", "orange"];
console.log(x);
When you open up your developer console by pressing F12
. You will then see the value printed to the console when your code executes.
Was this article helpful?