credify-web-react
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

credify-web-react

This is a React package of Credify Web SDK.

How to use

$ npm install credify-web
$ npm install credify-web-react

First, you need to call defineCustomElements() in your application.

/// index.ts or index.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

// Additional lines
import { applyPolyfills, defineCustomElements } from 'credify-web/loader';

ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();

// Additional lines
applyPolyfills().then(() => {
  defineCustomElements();
});

Then, you can import React components like following.

import { CredifyModal } from 'credify-web-react';

const sample = () => {
  return (
    <div>
      <CredifyModal></CredifyModal>
      ...
    </div>
  )
}

Note

When you distribute this SDK, you will need to remove the first line in components.d.ts.

Readme

Keywords

none

Package Sidebar

Install

npm i credify-web-react

Weekly Downloads

1

Version

0.4.0

License

none

Unpacked Size

60.2 kB

Total Files

32

Last publish

Collaborators

  • ngo275