Closed jonathan-chin closed 1 month ago
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.
I tried to use
setDefaults
as it is shown in the README by specifying onlykey
,language
, andregion
.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.