React Quickstart
You will learn the following:
- Create a new React app using Vite
- Install
@plandalf/react-plandalf-js
- Set your Plandalf API keys
- Add
<PlandalfProvider>
- Create a checkout component to handle payments
Installation
Install Plandalf using your preferred package manager:
terminal
bash
npm install @plandalf/react-plandalf-js
Basic Setup
- Initialize Plandalf in your application:
src/App.js
javascript
import { PlandalfProvider } from '@plandalf/react';
function App() {
const JWT = 'your_jwt_token';
return (
<PlandalfProvider agent={JWT}>
{/* Your app content */}
</PlandalfProvider>
);
}