TheWidlarzGroup / rn-emoji-keyboard

Super performant, lightweight, fully customizable emoji picker 🚀
https://thewidlarzgroup.github.io/rn-emoji-keyboard/
MIT License
330 stars 61 forks source link

Require cycle warning #72

Closed Pika-Pool closed 2 years ago

Pika-Pool commented 2 years ago

Describe the bug Running the app prints this warning on the console as well as shows a toast on the app in dev mode.

 WARN  Require cycle: node_modules/rn-emoji-keyboard/src/contexts/KeyboardContext.tsx -> node_modules/rn-emoji-keyboard/src/contexts/KeyboardProvider.tsx -> node_modules/rn-emoji-keyboard/src/contexts/KeyboardContext.tsx

To Reproduce use the EmojiPicker component in your app

Expected behavior This warning should be resolved

Screenshots NA

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context NA

Pika-Pool commented 2 years ago

To fix this, the defaultKeyboardContext and defaultKeyboardValues have to be defined in KeyboardContext.tsx. After that, either

I can create a PR on whichever way is more prefered. Let me know