Release v0.19.0. See the `## [0.19.0] — 2026-09-29` section of [CHANGELOG.md](https://github.com/ralksta/immich-folio/blob/dev/CHANGELOG.md) for the full list. Highlights: client proofing links (#683), custom content pages (#738), asset picker search (#740), concurrent-edit detection (#742), env-locked settings (#739), an accessibility baseline (#741), three security fixes with advisories (#737, #755, #759), and a pre-release quality pass (#780–#797). --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: ralksta <ralksta@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Ralf <rohlenbo79@gmail.com> Co-authored-by: Paul Thies <110185070+ImScheinox@users.noreply.github.com> Co-authored-by: lancetm714 <108419425+lancetm714@users.noreply.github.com> Co-authored-by: Lance Martin <lancetaylor95@gmail.com>
21 lines
631 B
TypeScript
21 lines
631 B
TypeScript
'use client';
|
|
|
|
import { useEffect, useRef } from 'react';
|
|
|
|
/**
|
|
* A ref that always holds the value of the latest render.
|
|
*
|
|
* For code that awaits a request and then has to know whether the editor moved
|
|
* on meanwhile: a save handler closes over the state it started with, so after
|
|
* the `await` it cannot tell "nothing changed" from "the operator kept typing".
|
|
* Comparing what was sent with `ref.current` can (every edit replaces the state
|
|
* value, so identity is enough).
|
|
*/
|
|
export function useLatest<T>(value: T) {
|
|
const ref = useRef(value);
|
|
useEffect(() => {
|
|
ref.current = value;
|
|
}, [value]);
|
|
return ref;
|
|
}
|