SDK JS - React
Our React SDK is compatible with the most updated standard for web development, as well as providing functions and components that allow for simplified integration with Mercado Pago.
To use the React SDK, install it via npm using the code below.
npm install @mercadopago/sdk-react
Next, add the public key of the account being integrated so that it can be identified when connecting to Mercado Pago.
import { initMercadoPago } from '@mercadopago/sdk-react'
initMercadoPago('YOUR_PUBLIC_KEY');
After completing the SDK installation, you can use the following modules to create the Checkout.