Ionic React 6.2.7 - Setting object state when IonInput and IonSelect values are binded returns undefined for IonInput fields

Whenever setting useState state object values with setState, the first time will return undefined for IonInput fields and will only set the IonSelect value. After using setState again, it works as expected. This happens no matter the object has initial values or not, or even if all the inputs have been filled manually.

Here is a codesandbox that reproduces the error: https://codesandbox.io/s/ionic-react-forked-oizcus?file=/src/pages/Home.jsx

try using the function version of setState. the state may be updated asynchronously, you cannot not rely on their values for calculating the next state.

    setUser((p) => {
      return {
        ...p,
        language: "en"
      };
    })

see the working solution here
Ionic React (forked) - CodeSandbox