Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Cart context useCartState() at app level. #486

Closed
tyler-tessmann-bounteous opened this issue Feb 12, 2021 · 2 comments · Fixed by #487
Closed

Export Cart context useCartState() at app level. #486

tyler-tessmann-bounteous opened this issue Feb 12, 2021 · 2 comments · Fixed by #487

Comments

@tyler-tessmann-bounteous
Copy link
Contributor

User Story

As a developer, I want the ability to use the Cart context throughout the CommerceApp so that other external components can react to state changes of the MiniCart.

Description & Motivation

Currently, the MiniCart context [../components/Minicart/cartContext.js - line 133] is not exported for later use within the CommerceApp. The motivation behind this fix stems from a desire to add new components in the header for a business client that will require the current state of the Cart -- ie isOpen or other stored state values.

Deliverables

Code changes:

  1. Within 'Minicart/index.js' export useCartState from './cartContext';
  2. Within the main 'index.js' file, export useCartState from './components/Minicart';

Acceptance Criteria

A developer should be able to import { useCartState } from '@adobe/aem-core-cif-react-components' with no errors.

Verification Steps

Try importing useCartState and using it within a child component of the .

@tyler-tessmann-bounteous
Copy link
Contributor Author

@dplaton - I see this got closed but it missed the 1.8.0 release if i'm not mistaken. What has your release schedule looked like lately? thank you

https://www.npmjs.com/package/@adobe/aem-core-cif-react-components

@dplaton
Copy link
Contributor

dplaton commented Feb 26, 2021

Hi @tyler-tessmann-bounteous,

Yes, indeed, it was merged right after the release was cut so it missed 1.8.0. Our next release is at the end of March

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants