skip to Main Content

Css – How can I make the react component completely disappear from the dom so that the animation is preserved?

App.jsx import React, { useState } from "react"; import Modal from "./components/Modal/Modal"; export default function App() { const [showModal, setShowModal] = useState(false); return ( <div className="app"> <p className="ppp">Sample text</p> <div className="modal_menu_wrap"> <div className="modal_menu"> <button onClick={() => { setShowModal(true); }} className="open-btn"…

VIEW QUESTION

Javascript – i set the key in the map but unique key error still exist

<MenuList width={'148px'} > { Object.entries(userRoleMenu[UserRole]).map((item, index) => <> {item[0]==='fpv? <MenuItem _hover={{backgroundColor:'gray.50'}} key={item[0]} onClick={handleMenuClick(item)}> </MenuItem> : <MenuItem _hover={{backgroundColor:'gray.50'}} key={item[0]} onClick={handleMenuClick(item)}>{item[0]}</MenuItem> } </>) } </MenuList> error: UserProfileThumbnailMenuList.tsx:65 Warning: Each child in a list should have a unique "key" prop. Check the render…

VIEW QUESTION
Back To Top
Search