X-Guard / react-native-flic2

Use Flic 2 within your React Native application with ease.
Other
8 stars 9 forks source link

Circular Dependecies #33

Closed punndcoder28 closed 1 year ago

punndcoder28 commented 2 years ago

While going through the code for the package, I noticed that there is a circular dependency where Flic is imported in FlicButton which is in turn imported in Flic. Is this a necessary cycle? Can this be handled in a better manner? I would love to hear any suggestions and also contribute to solving this.

jdegger commented 2 years ago

We had the same problem in our main app. We recently resolved that by having the singletons defined as a global variable in de main index file. It's not ideal but removes the need for circular deps. If you have a better suggestion, it's also welcome of course. 👍

wesdewitte commented 1 year ago

Stale