maslianok / react-resize-detector

A Cross-Browser, Event-based, Element Resize Detection for React
http://maslianok.github.io/react-resize-detector/
MIT License
1.25k stars 91 forks source link

remove duplicate imports #232

Closed josiahsrc closed 1 year ago

josiahsrc commented 1 year ago

We've seen some issues on our project indicating that this repo has duplicate React declarations. For instance, we're seeing this error:

[commonjs--resolver] Identifier 'React' has already been declared (2:10) in /usr/src/app/node_modules/react-resize-detector/build/index.esm.js
file: /usr/src/app/node_modules/react-resize-detector/build/index.esm.js:2:10
1: import*as React from'react';import {cloneElement,isValidElement,createRef,PureComponent,Component,forwardRef,useRef,useState,useEffect,useLayoutEffect}from'react';import {findDOMNode}from'react-dom';/******************************************************************************
2: Copyright (c) Microsoft Corporation.

I confirmed that these changes fix the above error and still functions as intended.

MichaelWGibson commented 1 year ago

I'm running into the same issue, any chance we could get this merged?

snelsi commented 1 year ago

@maslianok Please take a look when you have time

maslianok commented 1 year ago

@josiahsrc Thank you! merged