handle the onkeypress event in reactjs

You’re setting location to be an empty string on every keypress, so Location state will be an empty string every time you call onChange.

So a fix for this is removing the setLocation("") in getWeatherInfo

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top