javascripttypescriptgoogle-mapsreact-wrapper

render declaration for map in javascript


I try to add @googlemaps/react-wrapper in my project, following this explaination : https://developers.google.com/maps/documentation/javascript/react-map But at the first instruction i have this,

const render = (status: Status) => {
  return <h1>{status}</h1>;
};

and if i really understand it is TypeScript and my project page is in javascript, how to do the same thing in javascript ? hope that it's not a too much stupid question. thanks by advance

EDIT :

I attempted to follow the instructions in the Google Maps React documentation here, but I ran into an issue with the initial example:

const render = (status: Status) => {
  return <h1>{status}</h1>;
};

Since my project is written in JavaScript, not TypeScript, I'm unsure how to adapt this code. How can I rewrite this in plain JavaScript while maintaining its functionality?

I want to ensure my question is general enough to help others with similar issues, but let me know if more details about my project are necessary.

Thank you for your guidance!


Solution

  • Just remove the type :status like purpose by @jonrsharpe