小编Jea*_*ers的帖子

如何摆脱控制台警告:expo-app-loading 已被弃用,转而使用 expo-splash-screen?

我不断收到此错误,内容如下:

expo-app-loading 已弃用,取而代之的是 expo-splash-screen

这是 App.js 中我的启动屏幕的代码


export default function App() {

  const [IsReady, SetIsReady] = useState(false);

  const LoadFonts = async () => {
    await useFonts();
  };

  if (!IsReady) {
    return (
      <AppLoading
        startAsync={LoadFonts}
        onFinish={() => SetIsReady(true)}
        onError={() => {}}
      />
    );
  }

  SplashScreen.hideAsync();
  setTimeout(SplashScreen.hideAsync, 2000);

  return (
    <NavigationContainer style={styles.container}>
   <UserStack/>
   </NavigationContainer>
  );
}

Run Code Online (Sandbox Code Playgroud)

javascript firebase react-native expo

8
推荐指数
1
解决办法
1万
查看次数

如何在.NET MAUI中制作自动登录系统?

我希望用户能够自动登录我的 .NET MAUI 应用程序。

我已经完成了登录系统,但我不知道如何在关闭应用程序后使登录保持不变。

这是到目前为止我的登录系统。

 public partial class Login
    {
        // User credentials
        string username;
        string password;

        // Try verification
        public async Task LoginVerification()
        {
            // Check if credentials are valid in the database.
            bool isValid = await CheckIfValid(username, password);

            if (isValid)
            {
                Debug.WriteLine("User Was Found");
                // Do stuff after succesful login.
            }
            else
            {
                Debug.WriteLine("User Not Found");
                // Do stuff after unsuccesful login.
            }
        }

    }
Run Code Online (Sandbox Code Playgroud)

我怎样才能让他们下次启动应用程序时不必输入凭据?

.net c# authentication maui

1
推荐指数
1
解决办法
1494
查看次数

标签 统计

.net ×1

authentication ×1

c# ×1

expo ×1

firebase ×1

javascript ×1

maui ×1

react-native ×1