Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
react-hoc-console
Advanced tools
A way to see logs into React app through a simple and helpful UI.
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.
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 {React.Component} component - React component
* @param {Boolean} activate - Should console UI is activated
* @param {Boolean} autoScroll - Console UI scrolls down automatically when it receives new logs
*/
reactConsole(component:React.Component, activate:boolean = true, autoScroll:boolean = true);
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';
class App extends Component {
componentDidMount() {
console.log('Component Did Mount!');
console.info('Component Did Mount!');
console.warn('Component Did Mount!');
console.debug('Component Did Mount!');
console.error('Component Did Mount!', 'App.js - 12');
}
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
}
export default reactConsole(App);
FAQs
A way to see logs into React app through a simple and helpful UI.
We found that react-hoc-console demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.