display countries as flag. no need for external pics or svg, even on window.
npm install react-emoji-flagdisplay countries as flag. no need for external pics or svg, even on window.
The most efficient way to display countries as flag: using unicode directly on all modern operating systems.
"🇨ðŸ‡" if this looks like a flag, you are on a modern browser and operating system.
if it does look like "CH", I'm sorry that you are on window, that doesn't display country codes natively.
In that case, it loads a special font that does display the flag properly
on your react project:
import CountryFlag from 'react-emoji-flag';
import { useCountryFlag, flag} from "react-emoji-flag";
const YourComponent = (props) => {
useCountryFlag({ className: "country-flag" });
return (
https://github.com/talkjs/country-flag-emoji-polyfill