Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: React 16 compatibility #23

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Chore: React 16 compatibility #23

wants to merge 5 commits into from

Conversation

dotcs
Copy link

@dotcs dotcs commented Mar 9, 2018

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.

@coveralls
Copy link

coveralls commented Mar 9, 2018

Coverage Status

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants