0.0.7 • Published 4 years ago

@trevend/kit v0.0.7

Weekly downloads
1
License
UNLICENSED
Repository
github
Last release
4 years ago

Trevend JS & React library

Install

npm install --save @trevend/kit

Usage

import { render } from 'react-dom';
import React from 'react';
import {
  Provider,
  useProduct,
} from '@trevend/kit';

function App() {
  return (
    <Provider storeUrl="https://yourStore.trevend.com" apiKey="YourAPiKey">
      <div>
        <h2>My first Trevend product 🚀</h2>
        <Product />
      </div>
    </Provider>
  );
}

function Product() {
  const product = useProduct('IdOfYourFirstProduct');
  return JSON.stringify(product);
}

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

Get an API key

Goto https://trevend.com and create a new account. Obtain an API key from the merchant backend.

Example app

https://docs.trevend.com/docs/example-app

Documentation

Check out the documentation at https://docs.trevend.com/

License

UNLICENSED © Trevend

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago