React HOC Console
This is a simple HOC that allows you to see what is happening with the native console API, however, into your app. It's personalizable, I mean, you can activate or deactivate this HOC.
How to use
The reactConsole
method provides two parameters, the first one is waiting for a React component. The second one is a boolean that activates or deactivate the console UI. You still be able to see the native console working through the dev tools.
/** * @param * @param * @param */;
HOC working:
Below is a code generated by npx create-react-app
and modified to show the effect of the console.
Read more.
import React Component from 'react';import reactConsole from 'react-hoc-console';import logo from './logo.svg';import './App.css'; { console; console; console; console; console; } { return <div ="App"> <header ="App-header"> <img = ="App-logo" ="logo" /> <p> Edit <code>src/Appjs</code> and save to reload </p> <a ="App-link" ="https://reactjs.org" ="_blank" ="noopener noreferrer" > Learn React </a> </header> </div> ; } App;