Semantic-Org / Semantic-UI-React

The official Semantic-UI-React integration
https://react.semantic-ui.com
MIT License
13.21k stars 4.05k forks source link

Circular Dependency : Statistic and StatisticGroup #4474

Open djsethi09 opened 6 months ago

djsethi09 commented 6 months ago

Bug Report

When importing Statistic and StatisticGroup together in one import: the webpack throws error due to circular dependency.

Steps

Just try following import import { Statistic, StatisticGroup } from 'semantic-ui-react';

Expected Result

Should be importable

Actual Result

Reference Error

Version

2.1.5

Screenshot 2024-03-19 at 3 38 27 AM
welcome[bot] commented 6 months ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

djsethi09 commented 6 months ago

As a work around: I separated the imports in 2 lines and it works

shaynethiessen commented 3 months ago

As a work around: I separated the imports in 2 lines and it works

Thanks for the tip. That workaround also works for #4481

adam-bentley commented 2 months ago

As a work around: I separated the imports in 2 lines and it works

Thanks for the tip. That workaround also works for #4481

Hi,

Can you please explain how you got this working for #4481 Do you have an code example?

Thanks, Adam

djsethi09 commented 1 month ago

@adam-bentley import { Container, Segment, Grid, Header, Icon, Label, Statistic } from 'semantic-ui-react'; import { StatisticGroup } from 'semantic-ui-react'; //Import statistic and group separately due to circular dependency in the library

example above.