File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 11# Magento 2 Connector
22
3- [ Adobe Magento 2] ( https://devdocs.magento.com/guides/v2.3/graphql/ ) connector for [ React Storefront] ( https://github.com/react-storefront-community /react-storefront ) .
3+ [ Adobe Magento 2] ( https://devdocs.magento.com/guides/v2.3/graphql/ ) connector for [ React Storefront] ( https://github.com/react-storefront-foundation /react-storefront ) .
44
55## Requirements
66
@@ -13,14 +13,15 @@ See `.env.sample` file as an example of adding env variable via [dotenv](https:/
1313Initialize config environment variables by using
1414
1515``` js
16- require (' dotenv' ).config ();
17- ```
16+ require (' dotenv' ).config ()
17+ ```
1818
1919in one of your server files (for example ` server.js ` in NextJS).
2020
2121Then, you can simply import normalizer and fetch helper in your backend handlers.
2222
2323### Product data:
24+
2425``` js
2526import { fetchProduct , normalizeProduct } from ' react-storefront-magento2-connector/product' ;
2627...
@@ -31,6 +32,7 @@ const product = normalizeProduct(rawProduct, productId);
3132```
3233
3334### Product reviews:
35+
3436``` js
3537import fetchProductReviews from ' react-storefront-magento2-connector/product/reviews/fetchProductReviews' ;
3638...
@@ -150,12 +152,8 @@ if (error) {
150152 ...
151153```
152154
153-
154-
155-
156-
157155## Examples
158156
159157- See ` /examples/react/ ` for [ ReactJS] ( https://reactjs.org/ ) stuff examples
160- - See ` /examples/rsf/ ` for [ React Storefront] ( https://github.com/react-storefront-community /react-storefront ) handlers examples
158+ - See ` /examples/rsf/ ` for [ React Storefront] ( https://github.com/react-storefront-foundation /react-storefront ) handlers examples
161159- See ` /examples/next/ ` for [ NextJS] ( https://nextjs.org/ ) handlers examples (they are also can be used in RSF v7+)
You can’t perform that action at this time.
0 commit comments