-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(navigation): clean up formatting and verbiage of existing docume…
…ntation (#3003)
- Loading branch information
Showing
1 changed file
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |