DEV Community

Jeremy
Jeremy

Posted on

How do I console log the value of a component from another component?

For instance:

export default function SomeComponent(){
return(
<SomeOtherComponent/>
);
console.log(<SomeOtherComponent/>)
}
Enter fullscreen mode Exit fullscreen mode

That will log information about the component itself (typeof, etc.) but not the value of say, an autocomplete search result based on user input.

Top comments (0)