docs: document JS SDK installation (#9611)

- Add a page introducing JS SDK + how to install and use it (generally)
- Adjust admin tips on how to send requests
- Adjust storefront tips to mention JS SDK
- Add in the API reference intro how to install JS SDK
- Other related additions / changes

Closes DX-957
This commit is contained in:
Shahed Nasser
2024-10-18 12:47:40 +00:00
committed by GitHub
parent 5b91d71318
commit 85865c18ff
11 changed files with 666 additions and 184 deletions
@@ -8,17 +8,10 @@ In this document, youll find tips useful when building a storefront.
## Connect to the Medusa Application
<Note type="soon">
Support for Medusa v2 in Medusa React and the JS Client is coming soon.
</Note>
To send requests from the storefront to the Medusa applications Store API Routes, you have three options:
- **For JavaScript frameworks**: use Medusas [JS SDK](../../js-sdk/page.mdx) in any JavaScript framework. This NPM package facilitates interacting with the backends REST APIs.
- **For other frontend technologies**: interact directly with the Medusa application by sending requests to its [Store REST APIs](https://docs.medusajs.com/api/store).
- **For React-based storefronts**: use Medusa React. It provides you with the necessary hooks to retrieve or manipulate data from your Medusa application.
- **For JavaScript frameworks**: use Medusas JavaScript Client in any JavaScript framework. This NPM package facilitates interacting with the backends REST APIs.
---
@@ -26,7 +19,7 @@ To send requests from the storefront to the Medusa applications Store API Rou
The `@medusajs/types` package provide API routes' request and response types.
If you're not using the JS Client or Medusa React, install `@medusajs/types` to use the correct request and response types:
If you're not using the JS SDK, install `@medusajs/types` to use the correct request and response types:
```bash npm2yarn
npm install @medusajs/types@rc