covid19india / covid19india-react

Tracking the impact of COVID-19 in India
https://www.covid19india.org
MIT License
6.86k stars 3.41k forks source link

After changing language and then coming back to english, the search placeholder displays weird strings #2507

Closed sheeerio closed 3 years ago

sheeerio commented 3 years ago

Screenshot 2021-06-27 at 7 06 00 PM

sbhrwlr commented 3 years ago

I think this is happening due to use of useCallback hook whenever we change language it is starting a new function without terminating the previous callback instance and mixing the city region names like in your example it is mixing Karnataka and Alappuzha. And if we create terminating point it will terminate all the instances of useCallback function. I guess this is the reason correct me if I am wrong.

shuklaayush commented 3 years ago

Duplicates #2322