Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
437 B
Text
16 lines
437 B
Text
// packages/react/use-previous/src/usePrevious.tsx
|
|
import * as React from "react";
|
|
function usePrevious(value) {
|
|
const ref = React.useRef({ value, previous: value });
|
|
return React.useMemo(() => {
|
|
if (ref.current.value !== value) {
|
|
ref.current.previous = ref.current.value;
|
|
ref.current.value = value;
|
|
}
|
|
return ref.current.previous;
|
|
}, [value]);
|
|
}
|
|
export {
|
|
usePrevious
|
|
};
|
|
//# sourceMappingURL=index.mjs.map
|