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

Chore: React 16 compatibility

Open dotcs opened this issue 7 years ago • 1 comments

In this PR I have updated some code parts, that broke with React 16.

These are the things I fixed in this PR:

  • Added typings to package.json (otherwise TypeScript typings are not recognised in consumer)
  • Fixed prepublishOnly npm script
  • Added build npm script
  • Added react@^16.0.0 to peer dependencies
  • Added prop-types package, because PropTypes have been removed in React 16
  • Added react and react-dom to dev dependencies, because otherwise tests won't work
  • Use ref instead of ReactDOM.findDOMNode, because the latter should be avoided and does not work properly in React 16
  • Add yarn.lock file
  • Fix issue in tslint config which lead to disallow imports from react-dom/server

If you want to test the current version with React 16, then you can use @dotcs/[email protected]. I have uploaded the fixed package to this npm repository.

dotcs avatar Mar 09 '18 18:03 dotcs

Coverage Status

Coverage increased (+0.03%) to 97.51% when pulling 3dfb879c9e618fde8643cf0e5a2f51f7100ab92e on dotcs:chore/react-16-compat into 8d76d67bf5458186447c6529c51758b8bb91d4a9 on Josh-ES:master.

coveralls avatar Mar 09 '18 18:03 coveralls