score:3

Accepted answer

in your example you'd want to use usecallback

export const listitem(props) {
    const {id, item, itemstatuses, workflows, taks} = props
    const [checked, setchecked] = usestate(false)
    const handlepress = usecallback(() => {
      // i have access to props now
    }, [id, item /* ... */ ])
    return (
        <checkboxitem
            key={id}
            title={item.title}
            onpress={handlepress}
        /> 
    )
}

Related Query

More Query from same tag