Skip to content

can I use state value as a startOnLeft? #4

@Choyeongdeok

Description

@Choyeongdeok
const [switch, setSwitch] = useState(false)

useEffect(() => {
    ...
    getValueFromServer()
    ...
    
    setSwitch(true)
}, [])

return (
    <CustomSwitch
        startOnLeft={switch}
    />
)

I changed switch to true when I got a true from getValueFromServer(), but CustomSwitch doesn't start on right side.
Should I have to use constant to startOnLeft?

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