aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.36k stars 2.1k forks source link

withAuthenticator warning: A component is changing an uncontrolled input of type text to be controlled. #13337

Open juri-diener opened 2 weeks ago

juri-diener commented 2 weeks ago
          Hi 👋 Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you. Thank you!

This is issue is still there. But only on the web. when I start typing something in that input, the warning pops up as well when pasting something.

Originally posted by @chrisbonifacio in https://github.com/aws-amplify/amplify-js/issues/9460#issuecomment-1055812116

Screenshot 2024-05-03 at 20 51 25
cwomack commented 2 weeks ago

Hey there, @juri-diener 👋. Looks like we may need a little more info about what's happening to cause this, your local setup, etc. Can you clarify what version of Amplify you're on and share any relevant frontend code that's causing this? Also, can you share your full package.json so we can see your dependencies? Thanks!

juri-diener commented 1 week ago

Hey, so the amplify version is 11.0.5 I had issues with the new one. And someone told me to use this version because it's kinda more stable.

` import React, { useEffect } from "react"; import { Stack } from "expo-router";

import { signOut } from "aws-amplify/auth"; import { withAuthenticator } from "@aws-amplify/ui-react-native";

import AntDesign from "@expo/vector-icons/AntDesign"; import { SafeAreaProvider } from "react-native-safe-area-context";

import { Amplify } from "aws-amplify"; import amplifyconfig from "../amplifyconfiguration.json";

Amplify.configure(amplifyconfig);

import { color } from "@/styles/colors"; import CustomButton from "@/components/CustomButton";

function RootLayout() { useEffect(() => { console.log("Mount"); return () => { console.log("Unmount"); }; }, []);

return (

{ return ( signOut()} viewStyle={{ backgroundColor: "transparent" }} > ); }, }} />

); }

// export default RootLayout; export default withAuthenticator(RootLayout); `

And my package.json:

` { "name": "app-connect", "version": "1.0.0", "main": "expo-router/entry", "scripts": { "start": "expo start", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web" }, "dependencies": { "@aws-amplify/cli": "^11.0.5", "@aws-amplify/react-native": "^1.0.28", "@aws-amplify/ui-react-native": "^2.1.5", "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@expo/metro-runtime": "~3.1.3", "@react-native-async-storage/async-storage": "^1.23.1", "@react-native-community/netinfo": "^11.3.1", "aws-amplify": "^6.0.28", "expo": "~50.0.14", "expo-av": "~13.10.6", "expo-constants": "~15.4.6", "expo-image-manipulator": "~11.8.0", "expo-image-picker": "~14.7.1", "expo-linking": "~6.2.2", "expo-router": "~3.4.8", "expo-status-bar": "~1.11.1", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.73.6", "react-native-gesture-handler": "~2.14.0", "react-native-get-random-values": "^1.11.0", "react-native-reanimated": "~3.6.2", "react-native-safe-area-context": "4.8.2", "react-native-screens": "~3.29.0", "react-native-web": "~0.19.6", "zustand": "^4.5.2" }, "devDependencies": { "@babel/core": "^7.20.0", "@types/react": "~18.2.45", "typescript": "^5.1.3" }, "private": true }

`