Skip to content

Commit

Permalink
docs(navigation): clean up formatting and verbiage of existing docume…
Browse files Browse the repository at this point in the history
…ntation (#3003)
  • Loading branch information
xelaint authored Aug 20, 2024
1 parent 98fafbf commit 9f129c1
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions libs/navigation/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# @daffodil/navigation
`@daffodil/navigation` manages the graphQL calls, state, selectors, and models for a complete tree of the root category request.

Building and maintaining a model and code for an ecommerce store is complex and mentally taxing. `@daffodil/navigation`
provides clear interfaces, models, and factories for the frontend of an ecommerce store so that you don't have to.

The navigation module manages the graphQL calls, state, selectors, and models for a complete tree of the root category request. 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.

Right now, the `@daffodil/navigation` package supports an in-memory for developing locally (only outputs a shallow tree) and a magento driver.
## Overview
Right now, `@daffodil/navigation` currently supports both a Magento driver and an in-memory driver (only outputs a shallow trees) for local development.

## Installation
```
To install `@daffodil/navigation`, use the following commands in the terminal.

Install with npm:
```bash
npm install @daffodil/navigation
```

To use the `@daffodil/navigation` with an `in-memory-web-api`, import the `DaffNavigationInMemoryDriverModule.forRoot()` into your app.module. To use the `@daffodil/navigation` with a magento backend, import the `DaffNavigationMagentoDriverModule.forRoot()` into your app.module.
Install with yarn:

```bash
yarn add @daffodil/navigation
```

## Getting started

### Using in-memory web API
Import the `DaffNavigationInMemoryDriverModule.forRoot()` into your root component.

### Using Magento backend
Import the `DaffNavigationMagentoDriverModule.forRoot()` into your root component.

## Usage
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.

0 comments on commit 9f129c1

Please sign in to comment.