
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-modal-observer
Advanced tools
Package to handle modals in react with javascript observer pattern.
React modal observer allows you to create a modal from anywhere without using context and passing down props to the component, with just a function!
$ npm install --save react-modal-observer
$ yarn add react-modal-observer
import React from 'react'
import { Modals, addModal } from 'react-modal-observer'
export default function App() {
const handleOpen = () => {
addModal(TestModal, { description: 'This is a test modal' }, { backgroundColor: 'green' })
}
return (
<>
<main>
<button onClick={handleOpen}>Open Modal</button>
</main>
<Modals
backgroundColor="rgba(0, 0, 0, 0.5)"
duration={250} // miliseconds
/* NOTE: You can't use `animationType` at the same time as `customAnimation`. */
animationType="fade" // 'none' | 'fade' | 'fade-with-scale' | 'slide-left' | 'slide-right'
noScroll={true} // Prevents html scrolling when the modal is open
timingFunction="ease"
Spinner={<div className='spinner' />} // Component to show while the modal is loading
customAnimation={
parentClassName: 'page-center' // .page-center: { justify-content: center }
classNames: {
enter: 'custom-enter',
enterActive: 'custom-enter-active',
exit: 'custom-exit',
exitActive: 'custom-exit-active',
}
}
/>
</>
)
}
const TestModal = ({ description, closeModal }) => {
return (
<div>
<button onClick={closeModal}>Close Modal</button>
<h1>Test Modal</h1>
{description}
</div>
)
}
FAQs
Package to handle modals in react with javascript observer pattern.
The npm package react-modal-observer receives a total of 1 weekly downloads. As such, react-modal-observer popularity was classified as not popular.
We found that react-modal-observer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.