MCPcopy Index your code
hub / github.com/aaronhayes/react-use-hubspot-form

github.com/aaronhayes/react-use-hubspot-form @v2.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.2 ↗ · + Follow
12 symbols 18 edges 5 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

React Use HubSpot Form Embed

npm (scoped) Bundle Size License

Embed HubSpot forms into your React components using hooks! Works with Create React App, Gatsby and other platforms.

Install

$ npm install --save @aaronhayes/react-use-hubspot-form
$ yarn add @aaronhayes/react-use-hubspot-form

Getting Started

Wrap your application with HubspotProvider. This will add Hubspot script to the head of your document.

import React from 'react';

import { HubspotProvider } from '@aaronhayes/react-use-hubspot-form';

const MyApp = () => (
    <HubspotProvider>
        <MyPage />
    </HubspotProvider>
)

Usage

import React from 'react';

import { useHubspotForm } from '@aaronhayes/react-use-hubspot-form';

const MyPage = () => {
    const { loaded, error, formCreated } = useHubspotForm({
        portalId: 'XXXXXXX',
        formId: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
        target: '#my-hubspot-form'
    });

    return (



            <h1>Embed Form Below</h1>








    )
}

Breaking Changes

2.0.0

  • Introduction of the HubspotProvider component. This needs to be included in your App for useHubspotForm to work.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 6
Interface 5
Enum 1

Languages

TypeScript100%

Modules by API surface

src/index.ts4 symbols
src/HubspotProvider.tsx4 symbols
src/useScript.ts3 symbols
src/hubspot-form-locale.enum.ts1 symbols

For agents

$ claude mcp add react-use-hubspot-form \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page