I have a useState called isPackage which is a boolean that starts as false. I use this hook in a simple JSX select, which when isPackage is true requires it to be enabled but when it is false it is disabled. The problem starts from the rendering since although usPackage is false, the select is shown enabled. This is my code:

UseState:

```
const [isPackage, setIsPackage] = useState(false)

```

JSX:

```
 <select disabled = { isPackage ? true : false }>

```

I change the state of isPackage using this function:

```
const handlerPresentationSelected = () => {
  setIsPackage(!isPackage)
}

```

If I make the first change using the function above, it is executed correctly to pass isPackage to true, when I use the function again it correctly changes to false, however the select is always enabled.