@shopify/app-bridge-react
Shopify App Bridge offers React component wrappers for some App Bridge actions. This is a great option if you are already using React and want to follow familiar patterns.
Last updated 18 days ago by shopify-dep .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @shopify/app-bridge-react 
SYNC missed versions from official npm registry.

@shopify/app-bridge-react

Shopify App Bridge offers React component wrappers for some App Bridge actions. This is a great option if you are already using React and want to follow familiar patterns.

Instead of using App Bridge actions directly:

import createApp from '@shopify/app-bridge';
import {TitleBar} from '@shopify/app-bridge/actions';

const app = createApp({
  apiKey: '12345',
  shopOrigin: shopOrigin,
});

const titleBarOptions = {
  title: 'My page title',
};

const myTitleBar = TitleBar.create(app, titleBarOptions);

Use the React component wrappers:

Note Only one Provider is needed for your application.

import React from 'react';
import ReactDOM from 'react-dom';
import {Provider, TitleBar} from '@shopify/app-bridge-react';

function MyApp() {
  const config = {apiKey: '12345', shopOrigin: shopOrigin};

  return (
    <Provider config={config}>
      <TitleBar title="My page title" />
    </Provider>
  );
}

const root = document.createElement('div');
document.body.appendChild(root);
ReactDOM.render(<MyApp />, root);

See Shopify Developers for full documentation.

License: MIT

Current Tags

  • 1.26.2                                ...           latest (18 days ago)
  • 1.27.0-alpha.3                                ...           next (5 days ago)

81 Versions

  • 1.27.0-alpha.3                                ...           5 days ago
  • 1.27.0-alpha.2                                ...           5 days ago
  • 1.27.0-alpha.1                                ...           17 days ago
  • 1.26.2                                ...           18 days ago
  • 1.26.0                                ...           18 days ago
  • 1.26.0-alpha.1                                ...           18 days ago
  • 1.26.0-alpha.0                                ...           20 days ago
  • 1.25.1-alpha.0                                ...           24 days ago
  • 1.25.0                                ...           a month ago
  • 1.25.0-alpha.0                                ...           a month ago
  • 1.24.1-alpha.1                                ...           2 months ago
  • 1.24.1-alpha.0                                ...           2 months ago
  • 1.24.0                                ...           2 months ago
  • 1.24.0-alpha.0                                ...           2 months ago
  • 1.23.1                                ...           2 months ago
  • 1.23.0                                ...           2 months ago
  • 1.23.0-alpha.0                                ...           2 months ago
  • 1.22.0                                ...           2 months ago
  • 1.22.0-alpha.1                                ...           2 months ago
  • 1.22.0-alpha.0                                ...           2 months ago
  • 1.21.6                                ...           3 months ago
  • 1.21.4                                ...           3 months ago
  • 1.21.3                                ...           3 months ago
  • 1.21.2                                ...           4 months ago
  • 1.21.2-alpha.1                                ...           4 months ago
  • 1.21.1                                ...           4 months ago
  • 1.21.0                                ...           4 months ago
  • 1.20.3                                ...           4 months ago
  • 1.20.2                                ...           4 months ago
  • 1.20.1                                ...           5 months ago
  • 1.20.0                                ...           5 months ago
  • 1.20.0-alpha.0                                ...           5 months ago
  • 1.19.0                                ...           5 months ago
  • 1.18.0                                ...           5 months ago
  • 1.18.0-alpha.0                                ...           5 months ago
  • 1.17.0                                ...           5 months ago
  • 1.17.0-alpha.0                                ...           6 months ago
  • 1.16.0                                ...           6 months ago
  • 1.15.1-alpha.0                                ...           6 months ago
  • 1.15.0                                ...           6 months ago
  • 1.15.0-alpha.0                                ...           6 months ago
  • 1.14.0                                ...           7 months ago
  • 1.14.0-alpha.1                                ...           7 months ago
  • 1.13.1                                ...           7 months ago
  • 1.13.0                                ...           7 months ago
  • 1.13.0-alpha.0                                ...           8 months ago
  • 1.12.1-alpha.1                                ...           8 months ago
  • 1.12.1-alpha.0                                ...           8 months ago
  • 1.12.0                                ...           8 months ago
  • 1.12.0-alpha.0                                ...           8 months ago
  • 1.11.3                                ...           8 months ago
  • 1.11.3-alpha.0                                ...           8 months ago
  • 1.11.2                                ...           8 months ago
  • 1.11.1                                ...           8 months ago
  • 1.11.1-alpha.1                                ...           8 months ago
  • 1.11.0                                ...           9 months ago
  • 1.11.0-alpha.0                                ...           9 months ago
  • 1.10.1                                ...           9 months ago
  • 1.10.0                                ...           9 months ago
  • 1.9.0                                ...           10 months ago
  • 1.8.0                                ...           10 months ago
  • 1.8.0-alpha.0                                ...           10 months ago
  • 1.7.1                                ...           10 months ago
  • 1.6.9-alpha.0                                ...           a year ago
  • 1.6.8                                ...           a year ago
  • 1.6.8-alpha.0                                ...           a year ago
  • 1.6.7                                ...           a year ago
  • 1.6.7-alpha.1                                ...           a year ago
  • 1.6.6                                ...           a year ago
  • 1.6.5                                ...           a year ago
  • 1.6.5-alpha.2                                ...           a year ago
  • 1.6.5-alpha.1                                ...           a year ago
  • 1.6.4                                ...           a year ago
  • 1.6.3                                ...           a year ago
  • 1.6.2-alpha.0                                ...           a year ago
  • 1.6.1                                ...           a year ago
  • 1.6.0-alpha.2                                ...           a year ago
  • 1.6.0-alpha.1                                ...           a year ago
  • 1.5.4                                ...           a year ago
  • 1.5.3                                ...           a year ago
  • 1.5.2                                ...           a year ago

Copyright 2014 - 2016 © taobao.org |