Skip to content

One single React package during development-time#2274

Merged
compulim merged 10 commits intomicrosoft:masterfrom
compulim:feat-unbundle-react
Aug 7, 2019
Merged

One single React package during development-time#2274
compulim merged 10 commits intomicrosoft:masterfrom
compulim:feat-unbundle-react

Conversation

@compulim
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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