Skip to content

Remove react from dependencies #2

@mgs95

Description

@mgs95

react is included in both dependencies and peerDependencies, react should not be included inside dependencies as it may cause react to be installed twice and collide with the main react installation. The alternative is to add react as a devDependency.

Fragment from `react-grid-resizable package.json':

  "dependencies": {
    "@types/styled-components": "~4.0.3",
    "classnames": "^2.2.6",
    "react": "^16.8.4",
    "styled-components": "~4.0.3"
  },
  "peerDependencies": {
    "react": "^16.8.0"
  }

This is happening in my cases and produces an error.
More info here https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react

Screenshot of my react libs:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions