DEV Community

loading...

Discussion on: How to Debug in React

Collapse
pengeszikra profile image
Peter Vivo
export const jlog = p => JSON.stringify(p, null, 2);

// somewhere in component
<pre>{jlog(state)}</pre>;
Enter fullscreen mode Exit fullscreen mode