How do I create a popup window in react.js when the button and function are in separate file?
问题 Problem Description: There is a button on a webpage, and when I click the button, there will be a popup containing an image. The button is in the file called "index.jsx", and clicking on the button will trigger a function in the file "popUp.js", which will pop a window up. So in essence, the button and the PopUp function are in separate files. I want to write the function as: export function PopUp (image: Image){ return{ ... }; } which will have the same effect as https://www.w3schools.com