Skip to content

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

@ReactiveFilos

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions