tunoltd / emoji-mart-native

One component to pick them all 👊🏼
https://tunoltd.github.io/emoji-mart-native
BSD 3-Clause "New" or "Revised" License
86 stars 31 forks source link

[RN 0.57.2] Metro 'require cycles' warnings #46

Closed mjmasn closed 4 years ago

mjmasn commented 6 years ago

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.

The cyclic dependencies found by metro don't really matter here, it's because index.js is exporting a load of imports that in turn import index.js to access other components. However it's potentially a useful warning in the app, so would be nice to reduce the noise from npm libs if possible.

Looks like there are 4 warnings for emoji-mart-native:

Require cycle: node_modules/emoji-mart-native/dist/components/index.js -> node_modules/emoji-mart-native/dist/components/anchors.js -> node_modules/emoji-mart-native/dist/components/index.js

Require cycle: node_modules/emoji-mart-native/dist/components/index.js -> node_modules/emoji-mart-native/dist/components/category.js -> node_modules/emoji-mart-native/dist/components/index.js

Require cycle: node_modules/emoji-mart-native/dist/components/index.js -> node_modules/emoji-mart-native/dist/components/search.js -> node_modules/emoji-mart-native/dist/components/index.js

Require cycle: node_modules/emoji-mart-native/dist/components/index.js -> node_modules/emoji-mart-native/dist/components/picker/picker.js -> node_modules/emoji-mart-native/dist/components/picker/nimble-picker.js -> node_modules/emoji-mart-native/dist/components/index.js
pederjohnsen commented 4 years ago

Should've been fixed with this I think: https://github.com/tunoltd/emoji-mart-native/commit/f5ba3ccfa7e5afa2c6525d0d5e1e87daa9becc76

Closing