# The <PhotoViewer>

## Architecture

### The "basics"

The core gesture experience is managed by Swiper.js. In addition, Swiper.js
provides virtualization, zoom, and dismissable navigation elements out of the
box.

### Managing Updates

The `<PhotoViewer>` component utilizes `withControlledUpdates` to fully manage 
updates.

## Testing

### Manual

#### Gestures, transitions, and animations

**Non-dynamic**
* Buttery-smooth normal swiping with 9 slides
* Buttery-smooth slow swiping during virtual re-render does not skip
* Buttery-smooth fast swiping forwards, backwards, & in-place

**Dynamic**

#### Adding, removing, updating

**Non-dynamic**
* Prepending a photo adds the photo and updates navigation
* Appending a photo adds the photo and updates navigation
* Removing a photo removes the photo and updates navigation
* Removing a photo while a user is viewing it waits until the user has swiped to a new photo to remove it and updates navigation
* Updating a photo updates the photo

**Dynamic**

### Benchmarking

__Browser__: Firefox

### TODOs

- [ ] <PropChangeLimiter> to limit changes to props
- [ ] Memoize where possible
- [ ] Use RAF instead of throttle
