0.0.0-fd27551 • Published 8 months ago

@kernel/react v0.0.0-fd27551

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Getting Started

npm install @kernel/react@beta --save

Usage

If using Create React App, set REACT_APP_KERNEL_PUBLISHABLE_KEY to your Publishable Key in your .env file.

import { KernelProvider, Link } from '@kernel/react'

if (!process.env.REACT_APP_KERNEL_PUBLISHABLE_KEY) {
  throw new Error("Missing Kernel Publishable Key")
}
const kernelPubKey = process.env.REACT_APP_KERNEL_PUBLISHABLE_KEY;

function App() {
  return (
    <div className="App">
      <KernelProvider publishableKey={kernelPubKey}>
        <Link clientId={<unique_connection_identifier>}></Link>
        ...
      </KernelProvider>
    </div>
  );
}