Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-kinops-common
Advanced tools
Helpful components for developing Kinetic Kinops bundles with React.
yarn add react-kinops-common
Then you will want to include the shared reducers into your store:
import { reducers as kinopsReducers } from 'react-kinops-common';
// Change this in your store creation:
combineReducers({ ...reducers })
// To this:
combineReducers({ ...reducers, ...kinopsReducers })
There is a layout Redux module that allows you to know in your React code weather the browser is in mobile or desktop
mode. You will need to execute the following block of code with the store
object so it can begin dispatching layout
mode changes to Redux.
import { createLayoutListener } from 'react-kinops-common/layout';
createLayoutListener(store);
Then you need to merge your sagas with the shared sagas:
import { saga as kinopsSagas, combineSagas } from 'react-kinops-common';
// From this:
sagaMiddleware.run(sagas));
// To this:
sagaMiddleware.run(combineSagas([sagas, kinopsSagas]));
import 'react-kinops-common/styles/master.scss';
import { HeaderContainer, ToastsContainer, ModalFormContainer } from 'react-kinops-common';
// Example.
export const Layout = ({ handleSidebarToggle, sidebar }) =>
<div>
<ToastsContainer />
<ModalFormContainer />
<HeaderContainer hasSidebar toggleSidebarOpen={handleSidebarToggle} />
</div>;
You will need to follow all of the steps above so that the Redux store, Sagas, and component are all loaded and ready. To display a toast you only need to dispatch the action.
import { actions } from 'react-kinops-common/toasts';
const mapDispatchToProps = {
addError: actions.addError,
};
class View extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
this.props.addError('This was clicked');
}
render() {
return (
<div>
<button onClick={handleClick}>Click Me!</button>
</div>
);
}
}
export const ViewContainer = connect(null, mapDispatchToProps)(View);
FAQs
Utilities and components for development with React and Kinops
The npm package react-kinops-common receives a total of 2 weekly downloads. As such, react-kinops-common popularity was classified as not popular.
We found that react-kinops-common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.