skip to Main Content

React js using useState Hook – Magento

I'm trying to use useState react hook as follows, const [showMore, setShowMore] = useState(false); function handleClick(){ setShowMore(true); } I pass my wishlistItemCount value to WishlistItems component const wishListItemCount = showMore ? itemsCount : 3; const contentMessageElement = <WishlistItems itemCount={wishListItemCount} wishlistId={data.id}…

VIEW QUESTION
Back To Top
Search