
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-dumb-modal
Advanced tools
A simpler modal. A modal that is not self-aware.
var Modal = require('react-dumb-modal')
<Modal dismiss={function(){/* handle the dismiss here */}} />
Dumb Modals are always visible, hence being "dumb". Consequently you will need to control the visibility of the modal from the parent component. By moving all of the state out of the child component, it becomes easier to reason with. The same goes for any modal animations.
note: the dismiss prop is a function that will be called when a user presses escape or clicks off of the modal. Assuming you want to allow the user to dismiss the modal, you should implement some logic here that toggle off the modal (either by removing it altogether or changing the style).
See props in the usage example below:
<Modal
dismiss={function(){}}
overlayStyle={{background: 'rgba(0,0,0,.5)'}}
overlayClassName='overlay' //if you prefer to use css styling set a className here
modalStyle={{background: 'white'}}
modalClassName='modal' //className for the actual modal box
unstyled={true} //if true no default styles will be included
/>
import React, { Component } from 'react'
import Modal from 'react-dumb-modal'
class Page extends Component {
toggleModal = () => {
this.setState({showModal: !this.state.showModal})
}
render() {
return(
<div>
{this.state.showModal ? <Modal dismiss={this.toggleModal} /> : null}
</div>
)
})
FAQs
A simpler react modal.
We found that react-dumb-modal 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.