basementstudio / commerce-toolkit Goto Github PK
View Code? Open in Web Editor NEWShip better storefronts 🛍
Home Page: commerce-toolkit-nextjs-shopify.vercel.app
License: MIT License
Ship better storefronts 🛍
Home Page: commerce-toolkit-nextjs-shopify.vercel.app
License: MIT License
getting Error: Cannot find module 'ts-node'
when running the generator on an empty project.
First off all, awesome library. I've always wondered why nobody developed a production-ready shopping cart in React-query that can easily be imported into any project. Anyway, 2 quick questions:
Thanks.
Hi!
I am absolutely loving this toolkit but I just had a quick question. What have you found to be the best way to add support for querying content based on language/country with the @incontext directive? I've been messing around with it but I haven't been able to find a good way since it seems like its not possible to use both graphql variables and the @incontext.
Some documentation I've looked into already:
Thanks in advance!
The readme specifies that rendering the time on the server is difficult, or that we should render a different time until we are on the client. React says that we can (very carefully) still render different values on the server if the child is strictly only a text node.
From the React docs (https://reactjs.org/docs/react-dom.html):
If a single element’s attribute or text content is unavoidably different between the server and the client (for example, a timestamp), you may silence the warning by adding suppressHydrationWarning={true} to the element. It only works one level deep, and is intended to be an escape hatch. Don’t overuse it. Unless it’s text content, React still won’t attempt to patch it up, so it may remain inconsistent until future updates.
Maybe it would be cool to include this in the Readme. E.g:
import { useEffect, useState } from "react";
import { useCountdownStore } from "@bsmnt/drop";
const Countdown = () => {
const humanTimeRemaining = useCountdownStore()(
state => state.humanTimeRemaining,
);
return (
<div>
<h1>Countdown</h1>
<ul>
<li suppressHydrationWarning>Days: {humanTimeRemaining.days}</li>
<li suppressHydrationWarning>Hours: {humanTimeRemaining.hours}</li>
<li suppressHydrationWarning>Minutes: {humanTimeRemaining.minutes}</li>
<li suppressHydrationWarning>Seconds: {humanTimeRemaining.seconds}</li>
</ul>
</div>
);
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.