Skip to content

Add react-dom as a peer dependency - #313

Merged
yen-tt merged 1 commit into
feature/mapbox-componentfrom
dev/reactdom-peer-dep
Oct 11, 2022
Merged

yen-tt merged 1 commit into
feature/mapbox-componentfrom
dev/reactdom-peer-dep

Conversation

@yen-tt

@yen-tt yen-tt commented Oct 11, 2022

Copy link
Copy Markdown
Contributor

Add react-dom as a peer dependency as it's now use in Mapbox component.

Note that, ReactDOM.render is deprecated in React 18, which now have a new client render function createRoot. For now, a warning will display in console informing user that the app will behave as if it’s running React 17 until the code switch to the new API. A new item will be created to address this issue.

TEST=manual

npm pack the component lib. Created a new React app using react 17/18, see that react-dom is installed as peer dep (automatically install with npm >=7) and mapbox component is display as expected (there's a warning in React 18).

@yen-tt
yen-tt requested a review from a team as a code owner October 11, 2022 19:40
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 85.878% when pulling 8211349 on dev/reactdom-peer-dep into 8c677c6 on feature/mapbox-component.

@github-actions

Copy link
Copy Markdown
Contributor

Current unit coverage is 89.12721893491124%
Current visual coverage is 73.77551020408163%
Current combined coverage is 89.64497041420118%

@yen-tt
yen-tt merged commit 69327c1 into feature/mapbox-component Oct 11, 2022
@yen-tt
yen-tt deleted the dev/reactdom-peer-dep branch October 11, 2022 20:18
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