Skip to content
Advertisement

Tag: reactjs-popup

Copy/Paste of Reactjs-Popup Example from the site does not work with useState

I’m trying out example code provided by Reactjs-Popup at https://react-popup.elazizi.com/controlled-popup/, but it doesn’t seem to work. I pretty much copy/pasted the code. What am I missing? I can make the popup to work if I remove all references to “useState”. index.js ControlledPopup.jsx Answer I think your problem comes from the way you’re trying to render your component in index.js. Since

Advertisement