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.
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.