@daffodil/navigation
manages the graphQL calls, state, selectors, and models for a complete tree of the root category request.
Right now, @daffodil/navigation
currently supports both a Magento driver and an in-memory driver (only outputs a shallow trees) for local development.
To install @daffodil/navigation
, use the following commands in your terminal.
Install with npm:
npm install @daffodil/navigation --save
Install with yarn:
yarn add @daffodil/navigation
Import the DaffNavigationInMemoryDriverModule.forRoot()
into your root component.
Import the DaffNavigationMagentoDriverModule.forRoot()
into your root component.
Requests for a navigation should be made with a DaffNavigationLoad(id)
action through the DaffNavigationFacade
. Selection of the retrieved navigation and its loading state can also be done through the DaffNavigationFacade
with the navigation$
and loading$
attributes.