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