Integration
Add a Waitlist to Your React App - Launch Queue
Integrate a waitlist signup form into your React application with a useEffect hook and a simple div. Works with Create React App, Vite, and any React setup.
Get Started FreeEmbed Code
component.jsx
import { useEffect } from 'react'
function WaitlistWidget() {
useEffect(() => {
const script = document.createElement('script')
script.src = 'https://launchqueue.app/widget.js'
script.async = true
document.body.appendChild(script)
return () => {
document.body.removeChild(script)
}
}, [])
return (
<div
data-lq-widget="signup"
data-api-key="YOUR_API_KEY"
data-project-id="YOUR_PROJECT_ID"
data-primary-color="#3B82F6"
data-button-text="Join the Waitlist"
></div>
)
}
export default WaitlistWidgetStep-by-step Setup
1
Create a waitlist component
Create a new React component that loads the Launch Queue widget script using a useEffect hook. This ensures the script is loaded when the component mounts and cleaned up when it unmounts.
jsx
// src/components/WaitlistWidget.jsx
import { useEffect } from 'react'
function WaitlistWidget() {
useEffect(() => {
const script = document.createElement('script')
script.src = 'https://launchqueue.app/widget.js'
script.async = true
document.body.appendChild(script)
return () => {
document.body.removeChild(script)
}
}, [])
return (
<div
data-lq-widget="signup"
data-api-key="YOUR_API_KEY"
data-project-id="YOUR_PROJECT_ID"
data-primary-color="#3B82F6"
data-button-text="Join the Waitlist"
data-collect-name="true"
></div>
)
}
export default WaitlistWidget2
Add the component to your page
Import and render the WaitlistWidget component wherever you want the signup form to appear in your application.
jsx
// src/pages/Waitlist.jsx
import WaitlistWidget from '../components/WaitlistWidget'
function WaitlistPage() {
return (
<main className="max-w-md mx-auto py-16">
<h1 className="text-3xl font-bold mb-6">
Join Our Waitlist
</h1>
<WaitlistWidget />
</main>
)
}
export default WaitlistPage3
Test and deploy
Run your React development server to verify the widget loads and functions correctly. Then build and deploy your app to your hosting platform.
bash
# Test locally
npm start
# Build for production
npm run buildWhy use Launch Queue with React
- Clean integration using React's useEffect hook for script lifecycle management
- Works with Create React App, Vite, Remix, and any React-based framework
- Component-based approach — reuse the widget anywhere in your app
- Automatic cleanup on unmount prevents memory leaks and duplicate scripts
- Compatible with React 16.8+ (any version that supports hooks)
Frequently Asked Questions
Add a waitlist to your React site
Start your 14-day free trial. No credit card required.
Start Free Trial