This project was bootstrapped with Create React App.
In order to run the app, following commands needs to be executed
npm install
npm run start
In addition, this app include tests. To run them, execute the command:
npm run test
I have proposed a different UX where the user can filter the cities by a text or by the selected ones. In addition, I have added a button to clear the selection so the user can reset the selection by just clicking on one button instead of uncheck all the preferred cities. I have not added a "select all" button because I don't think it applies to these scenario. I don't think someone prefers to live in all the cities in a country or state.
Something that could be also included is the ability to display the cities grouped by country or state. Whit a large list of cities like these, it could be a good idea to display them grouped. In addition, it could help the user to look for a city in a state or country if he doesn't rememeber the exact city name.