Code Monkey home page Code Monkey logo

react-storefront-connector's Introduction

Overview

This package contains the inferfaces that you must implement to create a connector for React Storefront. Connectors allow developers to easily create a React Storefront front-end for popular ecommerce platforms such as Magento.

A connector package explorts an implementation of Connector as it's default export.

Core Concepts

  • Each Connector method represents an API called made by a typical React Storefront application.
  • Most methods returns a Result, which contains both app and page level data. App data is used to populate the main menu, navigation tabs, etc..., while page data is used to render the main body the specific page being viewed (product data, category data, etc...).
  • App level data only needs to be included when connector methods are called during server-side rendering. During server-side rendering, the request will contain the _includeAppData=1 query parameter. The react-storefront package provides fulfillAPIRequest method to help you return app data only during server-side rendering. You can see it in use in react-storefront-magento2-connector in the withAppData higher-order function, which is used connector methods like product.
  • Connectors can contain additional methods beyond those specified in react-storefront-connector, but the default React Storefront starter app won't make use of them. Developers will need to add functionality to the app to take advantage of additional methods in the connector.

Example Implementation

For a reference implementation see react-storefront-magento2-connector.

react-storefront-connector's People

Contributors

markbrocato avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.