Home > Software engineering >  render declaration for map in javascript
render declaration for map in javascript

Time:05-30

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

CodePudding user response:

Just remove the type :status like purpose by @jonrsharpe

CodePudding user response:

Here's it's JavaScript conversion:

var render = function (status) {
    return { status: status } < /h1>;;
};
  • Related