Skip to content

Commit

Permalink
removed collapsable props as it does nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1206agra committed Aug 9, 2023
1 parent ef95fc0 commit 1b00d10
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,11 @@ import {

import useLayoutEffect from '../../../modules/useLayoutEffect';

type ReducedProps<TProps> = {
...TProps,
collapsable: boolean,
...
};
type CallbackRef<T> = T => mixed;

export default function useAnimatedProps<TProps: {...}, TInstance>(
props: TProps,
): [ReducedProps<TProps>, CallbackRef<TInstance | null>] {
): [TProps, CallbackRef<TInstance | null>] {
const [, scheduleUpdate] = useReducer(count => count + 1, 0);
const onUpdateRef = useRef<?() => void>(null);

Expand Down Expand Up @@ -102,12 +97,9 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(

function reduceAnimatedProps<TProps>(
node: AnimatedProps,
): ReducedProps<TProps> {
// Force `collapsable` to be false so that the native view is not flattened.
// Flattened views cannot be accurately referenced by the native driver.
): TProps {
return {
...node.__getValue(),
collapsable: false,
};
}

Expand Down

0 comments on commit 1b00d10

Please sign in to comment.