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

One single React package during development-time #2274

Merged
merged 10 commits into from
Aug 7, 2019

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Aug 6, 2019

Fixes #2261.

Changelog Entry

Breaking changes

  • We will no longer include react and react-dom in our NPM package, instead, we will requires peer dependencies of react@^16.8.6 and react-dom@^16.8.6

Changed

Description

To use React hooks, both app and component must share the same reference of react and react-dom. Details can be found in this article, https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react, under "Duplicate React".

Since Web Chat is a mono-repo, we are using npm link (through lerna) during development. And this causes multiple react to live in memory.

On the other hand, we should not put react and react-dom as a production dependency of bundle.

Also, bumped web-speech-cognitive-services, cleaned up a few unused dependencies, and fixed a speech problem in playground.

Specific Changes

Please refer to CHANGELOG.md, pretty comprehensive there. 😉


  • Testing Added
    • Dependencies change

@compulim compulim changed the title One single React package [DRAFT] One single React package Aug 6, 2019
@coveralls
Copy link

coveralls commented Aug 6, 2019

Coverage Status

Coverage decreased (-0.05%) to 65.147% when pulling 590bb99 on compulim:feat-unbundle-react into ae8f30f on microsoft:master.

@compulim compulim changed the title [DRAFT] One single React package One single React package during development-time Aug 6, 2019
@tdurnford
Copy link
Contributor

LGTM

@compulim compulim merged commit e4f795a into microsoft:master Aug 7, 2019
@compulim compulim deleted the feat-unbundle-react branch August 7, 2019 08:30
@compulim compulim mentioned this pull request Oct 25, 2019
55 tasks
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.

Web Chat throwing "Invalid Hook" error with React Hooks
4 participants