GeekyAnts / GeekyAnts/NativeBase

Make `react-dom` optional peerDependency

Open
#5,503 2 comments 1 reaction 0 assignees View on GitHub
PR Added v3
Dominant language
TypeScript
Stars
20.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### Description

I would suggest to make `react-dom` an optional `peerDependency`, since pure `react-native` projects don't use `react-dom` at all.

### Problem Statement

The current forced `peerDependency` causes projects with no `react-dom` in their `dependencies` to cause an error with recent `npm` versions.

### Proposed Solution or API

Add a [peerDependencyMeta](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependenciesmeta) attribute inside `package.json` and declare `react-dom` as optional:

```json
...
"peerDependencyMeta": {
"react-dom": {
"optional": true
}
},
...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.