react-google-maps icon indicating copy to clipboard operation
react-google-maps copied to clipboard

Showing componentWillMount deprecated warnings .

Open vineet-agrawal96 opened this issue 6 years ago • 6 comments

How to fix this following warnings. I'm sure we are not using anywhere componentWillMount method in our project.

breadcrumbs.js:76 Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

  • Move code with side effects to componentDidMount, and set initial state in the constructor.
  • Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder.

Please update the following components: withGoogleMap(Component)

vineet-agrawal96 avatar Aug 14 '19 03:08 vineet-agrawal96

this project is unmaintained more than a year, please look at @react-google-maps/api

JustFly1984 avatar Aug 14 '19 07:08 JustFly1984

Is there a similar React component that is more actively maintained?

KevinBurton avatar Nov 11 '19 23:11 KevinBurton

@KevinBurton The repo of this project is unmaintained more than a year, and we had build new version https://www.npmjs.com/package/@react-google-maps/api

We had rewrite it to TypeScript, and updating it frequently: https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api You can enjoy autocomplete.

You can see our docs: https://react-google-maps-api-docs.netlify.com/

Also a lot of examples: https://react-google-maps-api-gatsby-demo.netlify.com/ https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api-gatsby-example/src/examples

The bundle size is much smaller: https://bundlephobia.com/result?p=@react-google-maps/[email protected]

Our Spectrum community: https://spectrum.chat/react-google-maps

Enjoy!


JustFly1984 avatar Nov 14 '19 01:11 JustFly1984

Hello!

Thanks for those informations @JustFly1984 Nevertheless, it was too late for me when I discovered this project is no longer maintain :S Can I suggest to add this precious information directly on README?

I already prepared a PR for this: https://github.com/tomchentw/react-google-maps/pull/1028

Many thanks!

NitnekB avatar Jan 14 '20 14:01 NitnekB

@NitnekB it is not possible to add PR, cos PR could be merged only by owner, who disagreed 2 years ago. Your PR is useless, nobody can't merge it. Consider to switch to my library.

JustFly1984 avatar Jan 14 '20 21:01 JustFly1984

Good to know, thx!

Too bad for this though. Other people will probably make the same mistake.. 😕

Anyway, thank you for your lib 👍

NitnekB avatar Jan 15 '20 08:01 NitnekB