Requirements: message box is displayed when the mouse mouseoverj, mouseoutj hide
import React,{useState,useEffect} from 'react'; import ReactDOM from 'react-dom'; import './index.css'; function Tips(props){ const [isShow,setShow]=useState(false); return( <div id="outer"> <label onMouseOver={()=>setShow(true)} onMouseOut = {() => setShow ( to false )} > <INPUT type = "CheckBox" /> within two weeks automatic landing </ label> <Div id = "tips" className = {isShow 'new':? ''}> For your information, please do not use this feature on Internet cafes or public computer! </ Div> </div> ) } ReactDOM.render( <Tips/>, document.getElementById('root') )