react-geocode
react-geocode copied to clipboard
outputFormat required in setDefaults
I tried to use setDefaults as it is shown in the README by specifying only key, language, and region.
however, my typescript compiler complained that outputFormat was required. not a big deal but might be confusing for anyone who wants to quickly try the package and is just following the README.
You can use this:
import { OutputFormat } from "react-geocode";
setDefaults({ key: "", // Your API key here. language: "en", // Default language for responses. region: "gh", // Default region for responses. outputFormat:OutputFormat.JSON });
I guess my issue was that the sample code in the README would not compile. I'd suggest updating it to include the required parameters.