segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.39k stars 832 forks source link

Exhaustive deps warning in AutcompleteTagInputExample #1502

Closed brandongregoryscott closed 2 years ago

brandongregoryscott commented 2 years ago

Looks like the way we've written this example is giving an exhaustive deps warning. Open the CodeSandbox at https://evergreen.segment.com/components/tag-input#autocomplete and click on the Problems panel to see:

image

I think we can move allValues outside of the function scope so it isn't redefined every render to resolve this warning.