mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
* chore: adding xylish's contributions + modifying styles * chore: nextui to heroui * chore: colors in theme generator * chore: radiuses, disable-opacity * chore: fixing the configuration box styles * chore: adding the showcase elemtents * chore: modifying styles * chore: adding the fonts * chore: adding the scaling * chore: removing the calendar * feat: adding the border-width * chore: modifying style for mobile * chore: modifying the styles * chore: removing the NextUI references + small bug fix * chore: adding coderabits reviews * fix: borderWidth not getting applied on breadcrumbs and input * chore: rebasing * chore: modifying the styles * chore: updating the styles for the smaller devices * chore: refactoring * chore: improvements * chore: making the fonts workable * chore: making the fonts workable * chore: modifying the swatch according to the theme * chore: adding the default selected template * chore: modifying mobile styles * chore: fixing the popover * chore: nit * fix: fixing the select styles * chore: modifying the mobile styles * chore: modifying the styles * fix: adding junior's suggestions * fix: fixing the breadcrumb * fix: adding junior's suggestions
19 lines
320 B
TypeScript
19 lines
320 B
TypeScript
import {useEffect, useRef} from "react";
|
|
|
|
/**
|
|
* Holds the previous value of the provided [value] parameter
|
|
*
|
|
* @param value
|
|
* @returns
|
|
*/
|
|
function usePrevious<T>(value: T) {
|
|
const ref = useRef<T>();
|
|
|
|
useEffect(() => {
|
|
ref.current = value;
|
|
}, [value]);
|
|
|
|
return ref.current;
|
|
}
|
|
export default usePrevious;
|