I am trying to use the function toggleView to change from the mfa otp enrollment code page back to the mfa otp QR code page. This function works when going from QR to code but not back. The AI assistant said ‘the docs confirm toggleView is valid in v1.5.0’ so I upgraded react and still had the issue. It also said my ‘runtime error means toggleView is returning undefined from the hook — this happens when the screen context doesn’t support toggleView at runtime (i.e., the Auth0 backend isn’t providing it for your current flow state).’ I tried to log the methods available from ‘@auth0/auth0-acul-react/mfa-otp-enrollment-code’ in the console and toggleView wasn’t listed. It was however listed on @auth0/auth0-acul-react/mfa-otp-enrollment-qr. Below is an example of the code:
// ``https://auth0.com/docs/libraries/acul/react-sdk/API-Reference/Screens/mfa-otp-enrollment-code/index
const handleSwitchToQrEnrollment = async () => {
executeSafely(Perform switch to QR Enroll, () => toggleView());
};
In my console, I keep getting this error: Uncaught TypeError: toggleView is not a function at onClick.