react-native-collapsible icon indicating copy to clipboard operation
react-native-collapsible copied to clipboard

Initial state handling seems broken in 1.6.2, re-switched to 1.6.1 and it's working fine

Open ReactiveFilos opened this issue 1 year ago • 5 comments

I'm in Expo React Native. Initial state: const [isCollapsed, setIsCollapsed] = useState<boolean>(false);

Simply using <Collapsible collapsed={isCollapsed}> with a toggle in a <PressableScale onPress={() => setIsCollapsed((prev) => !prev)}>

Problem is the component just starts closed not caring of initail state passed as prop. useEffect on mount setting isCollapsed STILL to false triggers a re-rendering making it to open.

Switching back to 1.6.1 worked fine.

ReactiveFilos avatar Oct 08 '24 03:10 ReactiveFilos

I'm in Expo React Native. Initial state: const [isCollapsed, setIsCollapsed] = useState<boolean>(false);

Simply using <Collapsible collapsed={isCollapsed}> with a toggle in a <PressableScale onPress={() => setIsCollapsed((prev) => !prev)}>

Problem is the component just starts closed not caring of initail state passed as prop. useEffect on mount setting isCollapsed STILL to false triggers a re-rendering making it to open.

Switching back to 1.6.1 worked fine.

👍

IndrakumarR avatar Oct 08 '24 14:10 IndrakumarR

Facing Same issue. Works fine on 1.6.1

malikzype avatar Oct 11 '24 12:10 malikzype

I'm getting the issue as well.

colbymchenry avatar Oct 14 '24 19:10 colbymchenry

Same issue, reverted to 1.6.1

C0rren avatar Oct 30 '24 10:10 C0rren

Hoping to see a fix for this soon.

JJSLIoT avatar May 09 '25 07:05 JJSLIoT