v3.0.0
3.0.0 (2024-07-26)
Release 3.0 comes with several new exciting features and an internal redesign to reduce the JS bundle size:
- Replacement of CSS-in-JS styling with an external CSS stylesheet
- Splitting the all-in-one
PhotoAlbum
component into three layout-specific components (the bundle is now tree-shakeable) - Experimental SSR component (zero-CLS SSR)
- Experimental InfiniteScroll component (rows and masonry layouts)
- Experimental ServerPhotoAlbum server component (zero client-side JS bundle)
Here is the overall impact on the JS bundle size (minified gzip):
- rows layout: 2.9 KB (38% decrease)
- columns layout: 2.9 KB (39% decrease)
- masonry layout: 2.3 KB (51% decrease)
- 3-in-1: 3.8 KB (19% decrease)
BREAKING CHANGES
- CSS stylesheet is required
PhotoAlbum
component is replaced with 4 separate components- the library is now ESM-only
- CJS build is no longer bundled
- React 16 and React 17 are no longer supported
- minimum Node version is set to Node 18
- output target is set to ES2020
renderContainer
is replaced withrender.container
render functionrenderRowContainer
is replaced withrender.track
render functionrenderColumnContainer
is replaced withrender.track
render functionrenderPhoto
is replaced with more granular render functions; see docscomponentsProps.containerProps
is replaced withcomponentsProps.container
componentsProps.rowContainerProps
is replaced withcomponentsProps.track
componentsProps.columnContainerProps
is replaced withcomponentsProps.track
componentsProps.imageProps
is replaced with more granular props; see docsimages
photo prop is no longer supported
Features
- add experimental
InfiniteScroll
component (fb2a048) - add experimental
ServerPhotoAlbum
component (b5cabe4) - add experimental
SSR
component (61b8a42) - add SSR fallback skeleton (475f2fb)
- enhance SSR component styling options (4398aad)
- forward photo album ref (00edf7c)
- improve types usability (f200a6c)
- offload offscreen photos in InfiniteScroll (eb3dd0d)
Bug Fixes
- add client boundary to aggregate layout (34a24c9)
- fix minPhotos edge case (7a04f02)
- move
SSR
component to subpath export (a1b0c28) - set container box-sizing to border-box (b2aebf4)