Giter VIP home page Giter VIP logo

commerce-toolkit's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar ignmandagaran avatar julianbenegas avatar moransantiago avatar ragojose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

commerce-toolkit's Issues

Add Line Items Quantity and createCartifNotFound

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:

  1. addLineItemstoCart: This just assumes that someone adds 1 of the item to the cart. But, vast majority of time, people want to add a specific quantity the cart via some quantity selector or input. So there should be a way to add a quantity of the item when adding line items to cart.
  2. createCartifNotFound - not clear how this works. In shopify example in the hooks index it's set to true but then in the fetcher fetchCart, you have a cart is not defined check? Won't the cart always get created now if createcartifnotfound is true? Or how is this used exactly? When is the cart created, if it is not found?

Thanks.

Localization

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!

fix: Important note regarding SSR for @bsmnt/drop

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>
  );
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.