Multiple Selection and Add/Delete Components using Effects

This app uses custom hooks for two purposes:

  1. To resolve the earlier bug. An effect is run whenever cities changes. This effect ensures that the invariant selCitiescities remains true.
  2. If the query parameter doLog is specified, then all mounts, unmounts and renders on all components are logged to the console using a effect encapsulated within a custom hook useLog().
    1. App