
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
react-redux-sweetalert
Advanced tools
SweetAlert with Redux-style actions, reducers API
$ npm install react-redux-sweetalert
import React, { Component } from 'react';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { reducer } from 'react-redux-sweetalert';
const rootReducer = combineReducers({
sweetalert: reducer,
});
const store = createStore(
rootReducer,
applyMiddleware(thunk),
);
render(
<Provider store={store}>
<ReduxSweetAlert />
</Provider>
);
You should import sweetalert.css from cdn, file, node_modules(sweetalert/dist/sweetalert.css) or wherever can find the css code.
Checkout full examples here.
{
// sweetalert option
title: string,
text?: string,
type?: string,
customClass?: string,
showCancelButton?: boolean,
showConfirmButton?: boolean,
confirmButtonText?: string,
confirmButtonColor?: string,
cancelButtonText?: string,
imageUrl?: string,
imageSize?: string,
html?: boolean,
animation?: boolean|string,
inputType?: string,
inputValue?: string,
inputPlaceholder?: string,
showLoaderOnConfirm?: boolean,
timer?: number,
closeOnConfirm?: boolean,
closeOnCancel?: boolean,
allowEscapeKey?: boolean,
allowOutsideClick?: boolean,
// custom option
onConfirm?: Function,
onCancel?: Function,
onClose?: Function,
onEscapeKey?: Function,
onOutsideClick?: Function,
}
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import ReduxSweetAlert, { swal, close } from 'react-redux-sweetalert'; // eslint-disable-line
class Main extends Component {
static propTypes = {
close: PropTypes.func.isRequired,
swal: PropTypes.func.isRequired,
};
render() {
return (
<div>
<button
onClick={() => this.props.swal({
title: 'Demo',
text: 'SweetAlert in React',
onConfirm: this.props.close,
})}
>Alert</button>
<ReduxSweetAlert />
</div>
);
}
}
export default connect(null, {
swal,
close,
})(Main);
Checkout full examples here.
import React, { Component } from 'react';
import { createStore, applyMiddleware } from 'redux';
import { combineReducers } from 'redux-immutable';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { immutableReducer } from 'react-redux-sweetalert';
const rootReducer = combineReducers({
sweetalert: immutableReducer,
});
const store = createStore(
rootReducer,
applyMiddleware(thunk),
);
render(
<Provider store={store}>
<ReduxSweetAlert />
</Provider>
);
See full example here.
MIT © C.T. Lin
FAQs
SweetAlert with redux-style actions, reducers API
We found that react-redux-sweetalert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.