score:1

Accepted answer
import "./styles.css";
import React, { useEffect, useState } from "react";
import IntlTelInput from "react-intl-tel-input";
import "react-intl-tel-input/dist/main.css";

export default function App() {
  return (
    <div className="App">
      <IntlTelInput
        containerClassName="intl-tel-input"
        inputClassName="form-control"
        preferredCountries={["tw"]}
        customPlaceholder={(num, country) => {
          console.log(country.name, country.dialCode, country.areaCodes);
        }}
        onPhoneNumberChange={(b, n, c, number) => {
          console.log(number);
        }}
      />
    </div>
  );
}

Related Query

More Query from same tag