@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 3 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.14.0                                ...           latest (3 days ago)
  • 1.14.0-alpha.1                                ...           next (16 days ago)

40 Versions

  • 1.14.0                                ...           3 days ago
  • 1.14.0-alpha.1                                ...           16 days ago
  • 1.13.1                                ...           18 days ago
  • 1.13.0                                ...           22 days ago
  • 1.13.0-alpha.0                                ...           a month ago
  • 1.12.1-alpha.1                                ...           a month ago
  • 1.12.1-alpha.0                                ...           a month ago
  • 1.12.0                                ...           a month ago
  • 1.12.0-alpha.0                                ...           a month ago
  • 1.11.3                                ...           2 months ago
  • 1.11.3-alpha.0                                ...           2 months ago
  • 1.11.2                                ...           2 months ago
  • 1.11.1                                ...           2 months ago
  • 1.11.1-alpha.1                                ...           2 months ago
  • 1.11.0                                ...           2 months ago
  • 1.11.0-alpha.0                                ...           2 months ago
  • 1.10.1                                ...           3 months ago
  • 1.10.0                                ...           3 months ago
  • 1.9.0                                ...           3 months ago
  • 1.8.0                                ...           3 months ago
  • 1.8.0-alpha.0                                ...           3 months ago
  • 1.7.1                                ...           4 months ago
  • 1.6.9-alpha.0                                ...           5 months ago
  • 1.6.8                                ...           5 months ago
  • 1.6.8-alpha.0                                ...           5 months ago
  • 1.6.7                                ...           6 months ago
  • 1.6.7-alpha.1                                ...           6 months ago
  • 1.6.6                                ...           7 months ago
  • 1.6.5                                ...           7 months ago
  • 1.6.5-alpha.2                                ...           7 months ago
  • 1.6.5-alpha.1                                ...           7 months ago
  • 1.6.4                                ...           7 months ago
  • 1.6.3                                ...           7 months ago
  • 1.6.2-alpha.0                                ...           8 months ago
  • 1.6.1                                ...           8 months ago
  • 1.6.0-alpha.2                                ...           8 months ago
  • 1.6.0-alpha.1                                ...           8 months ago
  • 1.5.4                                ...           8 months ago
  • 1.5.3                                ...           8 months ago
  • 1.5.2                                ...           8 months ago

Copyright 2014 - 2017 © taobao.org |