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

React is not defined in Shopify module

I tried to develop my first Shopify module but when i use React i have this error in my application page on the shop. Here my index.js import {Page} from "@shopify/polaris"; import {RessourcePicker} from "@shopify/app-bridge-react"; class Index extends React.Component{ state…

VIEW QUESTION
Back To Top
Search