1.0.16 • Published 2 years ago

rtc-react v1.0.16

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

rtc-react

RTC React

NPM JavaScript Style Guide

Install

npm install --save rtc-react

Usage

import React from 'react'
import { RTC, CartDisplay } from 'rtc-react'

const Site : any = (props:any) => {
  React.useEffect(() => {
      props.rtcApi.loadCart({
        defaultVariantId: "40194513993914",
        defaultAddons: "39518515298490"
      });

  }, [ props.rtcApi]);

  return (
    <CartDisplay />
  );

}

const App = () => {

  const eventHandler = async(e:any) => {
    console.log(`custom event handler received: ${e.eventType}`);
  };

  return (
    <RTC component={Site}
         apiEndpoint="api.burnerdomain.rtccart.io"
         eventHandler={eventHandler}
    />
  );
}

export default App;

License

UNLICENSED © scaledfury

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago