• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

28
Views
Can I use custom styling for loading message on @react-google-maps/api

I'm using @react-google-maps/api for my app and it works well so far, however, while the map is loading there is a very ugly text that says 'Loading...' displayed instead of a map and I was wondering if I can replace it with a proper loader or at least style the text?

Screenshot

about 1 month ago ·

Juan Pablo Isaza

1 answers
Answer question

0

Pass a ReactNode into the loadingElement prop.

const Loading = <div /> // change to whatever

<LoadScript
  googleMapsApiKey={googleMapsApiKey}
  ...
  loadingElement={Loading}
>...</LoadScript>

Example

about 1 month ago · Juan Pablo Isaza Report
Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.