Closed ssi02014 closed 1 month ago
Package Scope
@suspensive/react
Description
I think it's better to split them up, what do you think?
Possible Solution
to-be
// usePrevious.ts import { useEffect, useRef } from 'react' export const usePrevious = <TValue>(value: TValue): TValue => { const ref = useRef<TValue>(value) useEffect(() => { ref.current = value }, [value]) return ref.current }
// useIsChanged.ts import { usePrevious } from './usePrevious' export const useIsChanged = (value: unknown) => usePrevious(value) !== value
etc.
No response
Cool, Could I assign you to do this issue? In my opinion, @suspensive/utils could be good place to contain it too.
But usePrevious have no use case in other package, so do this in only @suspensive/react first.
@manudeli Yes! 🤗 I will create a pull request after working on it as soon as possible.
Package Scope
@suspensive/react
Description
I think it's better to split them up, what do you think?
Possible Solution
to-be
etc.
No response