React Integration

Two ways to use VisitorAPI in a React app, pick based on how much control you want over your form fields:

  • VisitorAPI SDK — call the API directly and wire up your own state. Use this if you’re building custom UI or only need a subset of the data (currency, language, device info, etc.).
  • react-country-state-fields — ready-made, auto-filling country, state, and city form fields. Use this if you just need location fields in a form and don’t want to hand-roll the wiring yourself.